filter_innd: Correctly read folded headers.
authorThomas Hochstein <thh@thh.name>
Sat, 20 May 2023 13:32:12 +0000 (15:32 +0200)
committerThomas Hochstein <thh@thh.name>
Sat, 20 May 2023 13:32:12 +0000 (15:32 +0200)
Signed-off-by: Thomas Hochstein <thh@thh.name>
filter/cleanfeed.local

index 3d37c7d..ef678c1 100644 (file)
@@ -1,4 +1,4 @@
-# vim: set syntax=perl ts=4 ai si:
+# vim: set tabstop=4 shiftwidth=4 expandtab syntax=perl:
 
 use MIME::Base64();
 use Digest::SHA();
@@ -36,10 +36,13 @@ sub verify_cancel($$$) {
    for my $line(split(/\s*\n/, $headers))    {
       if ($line =~ m/^([[:alnum:]-]+):\s+(.*)/) {
          $headers{$1} = $2;
+         $lastkey = $1;
+      } elsif ($line =~ m/^\s+(.*)/ and defined($lastkey)) {
+         $headers{$lastkey} .= ' ' . $1;
       }
    }
-
    my $lock = $headers{'Cancel-Lock'};
+
    if (defined($lock)) {
       my $key = $r_hdr->{'Cancel-Key'} || return "$descr of $target without Cancel-Key";
       #return verify_cancel_key($key, $lock, ' target=' . $target);
This page took 0.011586 seconds and 4 git commands to generate.