quilt/mail-fix-delivery-address-checking.patch

38 lines
1.1 KiB
Diff

From 00e551287a23749c7d1b0bc3e25741a5bd360bcd Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruen@linbit.com>
Date: Wed, 07 Dec 2011 17:52:39 +0000
Subject: quilt mail: Fix delivery address checking
Make sure to remove trailing whitespace (including the newline) when extracting
recipient addresses from headers.
---
diff --git a/quilt/scripts/edmail.in b/quilt/scripts/edmail.in
index 10aa771..140355b 100644
--- a/quilt/scripts/edmail.in
+++ b/quilt/scripts/edmail.in
@@ -128,11 +128,12 @@ sub split_recipients($) {
while ($recipients !~ /^\s*$/) {
my $recipient;
if ($recipients =~ s/^\s*,?\s*((?:"(?:[^"]+)"|[^",])*)//) {
- $recipient = $1; s/\s*$//;
+ $recipient = $1;
} else {
$recipient = $recipients;
$recipients = "";
}
+ $recipient =~ s/\s*$//;
push @list, $recipient;
}
return @list;
@@ -144,7 +145,7 @@ sub process_header($) {
my ($name, $value);
return unless defined $_;
- unless (($name, $value) = /^([\41-\176]+):\s*(.*)\s*/s) {
+ unless (($name, $value) = /^([\41-\176]+):\s*(.*)/s) {
print;
return
}
--
cgit v0.8.3.4