for my $line (@lines) {
if ($line =~ /(\S+?): (.*)/) {
my ($name, $value) = (lc $1, $2);
- $data{$namemap{$name}} = $value if exists $namemap{$name};
+ # this is a bit of a hack; we should never, ever have \r
+ # or \n in the fields of status. Kill them off here.
+ # [Eventually, this should be superfluous.]
+ $value =~ s/[\r\n]//g;
+ $data{$namemap{$name}} = $value if exists $namemap{$name};
}
}
for my $field (keys %fields) {
}
}
+ # this is a bit of a hack; we should never, ever have \r or \n in
+ # the fields of status. Kill them off here. [Eventually, this
+ # should be superfluous.]
+ for my $field (keys %newdata) {
+ $newdata{$field} =~ s/[\r\n]//g if defined $newdata{$field};
+ }
+
if ($version == 1) {
for my $field (@v1fieldorder) {
if (exists $newdata{$field} and defined $newdata{$field}) {
* Allow (almost) exactly what RFC2822 allows in comments (closes:
#497144)
* Fix problem with non-existant /etc/debbugs/config
+ * Ditch \r and \n in status fields (closes: #545895)
-- Don Armstrong <don@debian.org> Wed, 26 Aug 2009 21:32:53 -0700