From b8c2b200c3dd0678988593c5839be3cd2aecf84a Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 22 Nov 2009 22:23:59 +0100 Subject: Dpkg::Control::Hash: Strip leading spaces in the first line of a field's value The fields in a compliant control-style file are allowed to have values starting with any number of spaces. But that only applies to the first line on multi-line field values, so do not do the same on subsequent lines as those are handled differently. Regression introduced in commit 7d8d193332478de82e20ed5b49053378801d160f. Closes: #557547 --- scripts/Dpkg/Control/Hash.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/Hash.pm b/scripts/Dpkg/Control/Hash.pm index afb177b7e..06d34d1e1 100644 --- a/scripts/Dpkg/Control/Hash.pm +++ b/scripts/Dpkg/Control/Hash.pm @@ -168,7 +168,7 @@ sub parse_fh { next if (m/^$/ and $paraborder); next if (m/^#/); $paraborder = 0; - if (m/^(\S+?)\s*:\s?(.*)$/) { + if (m/^(\S+?)\s*:\s*(.*)$/) { if (exists $self->{$1}) { unless ($$self->{'allow_duplicate'}) { syntaxerr($desc, sprintf(_g("duplicate field %s found"), $1)); -- cgit v1.2.3