aboutsummaryrefslogtreecommitdiffstats
path: root/english/template/debian/securityreferences.wml
diff options
context:
space:
mode:
authorThomas Lange <lange@debian.org>2024-05-03 21:46:46 +0200
committerThomas Lange <lange@debian.org>2024-05-03 21:46:46 +0200
commitf192c0f9a5105a83d0cfb053a097c26f3a84a204 (patch)
treea7db2ac5c5954e1de1b4b674f6e29dbcbc14b09c /english/template/debian/securityreferences.wml
parent31f20e8148cc05e2ac37fc24362c90254fa4c188 (diff)
remove unused scripts/templates
Diffstat (limited to 'english/template/debian/securityreferences.wml')
-rw-r--r--english/template/debian/securityreferences.wml171
1 files changed, 0 insertions, 171 deletions
diff --git a/english/template/debian/securityreferences.wml b/english/template/debian/securityreferences.wml
deleted file mode 100644
index d2b8a48338c..00000000000
--- a/english/template/debian/securityreferences.wml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-# Generic source to add HTML links to common
-# vulnerability databases
-
-<bind-gettext-domain domain="security" />
-
-<perl>
-sub bid_secref {
- my $refstr = shift(@_);
- my $bid = "";
- foreach $ref (split(' ',$refstr)) {
- if ( $ref =~ /BID(\d+)/i ) {
- my $id = $1;
- $bid .= ", " if $bid ne "";
- $bid .= '<a href="http://online.securityfocus.com/bid/'.$id.'">'
- .'<gettext domain="security">BugTraq ID</gettext>'
- ." ".$id."</a>";
- }
- }
- return $bid;
-}
-sub cve_secref {
- my $refstr = shift(@_);
- my $cve = "";
- foreach $ref (split(' ',$refstr)) {
- if ( $ref =~ /((CVE|CAN)-[\d-]+)/i ) {
- my $id = $1;
- $cve .= ", " if $cve ne "";
- $cve .= "<a href=\"https://security-tracker.debian.org/tracker/".$id."\">".$id."</a>";
- }
- }
- return $cve;
-}
-
-sub cert_secref {
- my $refstr = shift(@_);
- my $cert = "";
- foreach $ref (split(' ',$refstr)) {
- if ( $ref =~ /(CA-[\d-]+)/i ) {
- my $id = $1;
- $cert .= ", " if $cert ne "";
- $cert .= "<a href=\"http://www.cert.org/advisories/".$id.".html\">".$id."</a>";
- }
- if ( $ref =~ /VU#(\d+)/i ) {
- my $id = $1;
- $cert .= ", " if $cert ne "";
- $cert .= "<a href=\"http://www.kb.cert.org/vuls/id/".$id."\">VU#".$id."</a>";
- }
- }
- return $cert;
-}
-sub bug_secref {
- my $refstr = shift(@_);
- my $bug = "";
- foreach $ref (split(' ',$refstr)) {
- if ( $ref =~ /Bug#(\d+)/i ) {
- my $id = $1;
- $bug .= ", " if $bug ne "";
- $bug .= '<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug='.$id.'">'
- .'<gettext domain="security">Bug</gettext>'
- ." ".$id."</a>";
- }
- }
- return $bug;
-}
-
-sub security_references {
- my $refstr = shift(@_);
- my $str = "";
- my $bid = "";
- my $cve = "";
- $bid = bid_secref($refstr);
- $cve = cve_secref($refstr);
- $cert = cert_secref($refstr);
- $bugs = bug_secref($refstr);
- $str .= q{<gettext domain="security">In the Debian bugtracking system:</gettext>}
- ." $bugs.<br/>"
- if $bugs ne "";
- $str .= q{<gettext domain="security">In the Bugtraq database (at SecurityFocus):</gettext>}
- ." $bid.<br/>"
- if $bid ne "";
- $str .= q{<gettext domain="security">In Mitre's CVE dictionary:</gettext>}
- ." $cve.<br/>"
- if $cve ne "";
- $str .= q{<gettext domain="security">CERT's vulnerabilities, advisories and incident notes:</gettext>}
- ." $cert.<br/>"
- if $cert ne "";
- $str = q{<gettext domain="security">No other external database security references currently available.</gettext>}
- if $str eq "";
- return $str;
-}
-</perl>
-
-
-# Only used in the nonvulns-* pages
-<define-tag nonvulns>
-<:
-sub secrefs
-{
- my $refstr = shift;
- my $result = '';
-
- my $bid = bid_secref($refstr);
- my $cve = cve_secref($refstr);
- my $cert = cert_secref($refstr);
- my $bugs = bug_secref($refstr);
-
- $result .= $bid if (length ($bid));
-
- if (length ($cve)) {
- $result .= ", " if $result ne "";
- $result .= $cve;
- }
- if (length ($cert)) {
- $result .= ", " if $result ne "";
- $result .= $cert;
- }
- if (length ($bugs)) {
- $result .= ", " if $result ne "";
- $result .= $bugs;
- }
- return $result;
-}
-
- my $id = '';
- my %ref = ();
- my %text = ();
- if (open (NV, "$(ENGLISHDIR)/security/nonvulns-%0.src")) {
- while (<NV>) {
- next if (/^(#|\s)\s*$/);
- if (/^((CVE-|CAN-|VU#|CA-|BID)\S+)\s*/) {
- $id = $1;
- } elsif (/^\s+((CVE-|CAN-|VU#|CA-|BID|Bug#).*\S)\s*$/) {
- $ref{$id} .= " " . $1;
- } elsif (/^\s+(.*)$/) {
- $text{$id} .= $1 . "\n";
- }
- }
- close (NV);
- }
-
- if (open (NV, "nonvulns-%0.src")) {
- while (<NV>) {
- next if (/^(#|\s)\s*$/);
- if (/^((CVE-|CAN-|VU#|CA-|BID)\S+)\s*/) {
- $id = $1;
- $text{$id} = '';
- } elsif (/^\s+((CVE-|CAN-|VU#|CA-|BID|Bug#).*\S)\s*$/) {
- # ignore
- } elsif (/^\s+(.*)$/) {
- $text{$id} .= $1 . "\n";
- }
- }
- close (NV);
- }
-
- my $url;
- my @urls;
- my ($bid, $cve, $cert, $bugs);
-<protect pass=2>
- foreach $id (sort keys %text) {
- $url = secrefs($id);
- $url =~ s/<a href/<a name=\"$id\" href/;
- printf "<p>%s:\n", $url;
- printf "%s\n", $text{$id};
- printf "(%s)\n", secrefs($ref{$id}) if (exists $ref{$id});
- print "</p>\n\n";
- }
-</protect>
-:>
-</define-tag>

© 2014-2024 Faster IT GmbH | imprint | privacy policy