From 2046fad8a19036f6d3433cb9083a4c45581e34db Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 2 Dec 2008 09:21:01 -0800 Subject: [PATCH] Strip BOM before regexes involving spaces (closes: #488554) --- debian/changelog | 1 + scripts/process | 3 +++ scripts/service | 3 +++ 3 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 725a32e..d954400 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 20 Jun 2003 18:57:25 +0100 diff --git a/scripts/process b/scripts/process index aa001b1..1bcc940 100755 --- a/scripts/process +++ b/scripts/process @@ -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*$//; diff --git a/scripts/service b/scripts/service index a642aab..94b2571 100755 --- a/scripts/service +++ b/scripts/service @@ -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*\#/; -- 2.39.2