projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7849d3b
)
Handle use of \" in email addresses
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 3 Jun 2010 18:45:47 +0000
(11:45 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 3 Jun 2010 18:45:47 +0000
(11:45 -0700)
mailboxes/boxes-lib.pl
patch
|
blob
|
history
diff --git
a/mailboxes/boxes-lib.pl
b/mailboxes/boxes-lib.pl
index
0869af0
..
4f1e6b6
100755
(executable)
--- a/
mailboxes/boxes-lib.pl
+++ b/
mailboxes/boxes-lib.pl
@@
-1689,6
+1689,7
@@
sub split_addresses
{
local (@rv, $str = $_[0]);
while(1) {
+ $str =~ s/\\"/\0/g;
if ($str =~ /^[\s,]*(([^<>\(\)\s]+)\s+\(([^\(\)]+)\))(.*)$/) {
# An address like foo@bar.com (Fooey Bar)
push(@rv, [ $2, $3, $1 ]);
@@
-1707,8
+1708,11
@@
while(1) {
# <foo@bar.com>
# <group name>
# foo@bar.com
- push(@rv, [ $3, $2 eq "," ? "" : $2, $1 ]);
- $str = $4;
+ my ($all, $name, $email, $rest) = ($1, $2, $3, $4);
+ $all =~ s/\0/\\"/g;
+ $name =~ s/\0/"/g;
+ push(@rv, [ $email, $name eq "," ? "" : $name, $all ]);
+ $str = $rest;
}
else {
last;