[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DSAs: Overly eager stripping of </dl> in parse-advisory.pl?



Hi there,

I lack access to security.d.o (which is a good thing), so I couldn't
really test the following patch myself ...

Well, I noticed that some DSAs missed a '</dl>' on the webwml[0],
apparently due to parse-advisory.pl stripping them too eagerly from the
.data file. While it's easily possible to add them later on again[1]
this just doesn't seem right, so here we go.

Could anybody with access to s.d.o test the patched script / provide a
better fix for this / provide some sample advisories to me via private
mail so I can test myself? DSA-1417 is a recent test candidate for this.

TIA,
Flo


[0] *** /org/www.debian.org/www/security/2007/dsa-1417.en.html
line 70 column 1 - Warning: missing </dl> before </div>
[1] http://cvs.debian.org/webwml/english/security/2007/dsa-1417.data?rev=1.2&view=log
Index: parse-advisory.pl
===================================================================
RCS file: /cvs/webwml/webwml/english/security/parse-advisory.pl,v
retrieving revision 1.65
diff -u -r1.65 parse-advisory.pl
--- parse-advisory.pl	24 Oct 2007 10:24:09 -0000	1.65
+++ parse-advisory.pl	9 Dec 2007 16:15:55 -0000
@@ -128,7 +128,7 @@
 $files =~ s/(?:  )?(\w+) architecture \(([\w -()\/]+)\)/<dt>$arch{$1}:/sg;
 $files =~ s/(?:  )?([\w -\/]+) architecture:/<dt>$1:/sg;
 $files =~ s/(?:  )?  (http:\S+)/  <dd><fileurl $1 \/>/sg;
-$files =~ s,[\n]?Debian (GNU/Linux )?(\S+) (alias |\()([a-z]+)\)?,</dl>\n\n<h3>Debian GNU/Linux $2 ($4)</h3>\n\n<dl>,sg;
+$files =~ s,[\n]?Debian (GNU/Linux )?(\S+) (alias |\()([a-z]+)\)?,<h3>Debian GNU/Linux $2 ($4)</h3>\n\n<dl>,sg;
 
 my @f = ();
 my $ign = 0;
@@ -156,7 +156,7 @@
 die "$wml already exists!\n" if (-f $wml);
 die "$data already exists!\n" if (-f $data);
 
-$files =~ s,^</dl>\n\n,,;
+$files =~ s,\n<h3>Debian GNU,\n</dl>\n\n<h3>Debian GNU,;
 open DATA, ">$data";
 print DATA "<define-tag pagetitle>$pagetitle</define-tag>\n";
 print DATA "<define-tag report_date>$date</define-tag>\n";

Attachment: signature.asc
Description: Digital signature


Reply to: