]> git.donarmstrong.com Git - debbugs.git/commitdiff
Strip BOM before regexes involving spaces (closes: #488554)
authorDon Armstrong <don@donarmstrong.com>
Tue, 2 Dec 2008 17:21:01 +0000 (09:21 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 2 Dec 2008 17:21:01 +0000 (09:21 -0800)
debian/changelog
scripts/process
scripts/service

index 725a32e9182d11186f46a88d508e47488696c5b4..d9544002e5a02dea6256c020cf9a73f5ff66634c 100644 (file)
@@ -233,6 +233,7 @@ debbugs (2.4.2) UNRELEASED; urgency=low
   * Deal properly with leading spaces in query arguments (closes: #158375)
   * Only send out control help when control is mailed (closes: #499941)
   * Resolve two XSS (closes: #504608)
+  * Strip BOM before regexes involving spaces (closes: #488554)
 
   
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Jun 2003 18:57:25 +0100
index aa001b11d2ba66138301fd4eabe6793b74015471..1bcc940f98a5117e386ecce7f78a4070d58efcf3 100755 (executable)
@@ -170,6 +170,9 @@ my %pheader;
 # extract pseudo-headers
 for my $phline (@bodylines)
 {
+    # Remove BOM markers from UTF-8 strings
+    # Fixes #488554
+    $phline =~ s/\xef\xbb\xbf//g;
     last if $phline !~ m/^([\w-]+):\s*(\S.*)/;
     my ($fn, $fv) = ($1, $2);
     $fv =~ s/\s*$//;
index a642aaba832f581f5120545802f7c5b13c6fc06e..94b2571b5a08dca6fdc121b47f8bba4c68fb81e2 100755 (executable)
@@ -176,6 +176,9 @@ for ($procline=0; $procline<=$#bodylines; $procline++) {
         last;
     }
     $_= $bodylines[$procline]; s/\s+$//;
+    # Remove BOM markers from UTF-8 strings
+    # Fixes #488554
+    s/\xef\xbb\xbf//g;
     next unless m/\S/;
     print {$transcript} "> $_\n";
     next if m/^\s*\#/;