summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--program/lib/Roundcube/rcube_mime.php4
-rw-r--r--tests/Framework/Mime.php2
2 files changed, 6 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index a931c27c1..55b70f67c 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -378,6 +378,10 @@ class rcube_mime
}
if ($decode) {
$name = self::decode_header($name, $fallback);
+ // some clients encode addressee name with quotes around it
+ if ($name[0] == '"' && $name[strlen($name)-1] == '"') {
+ $name = substr($name, 1, -1);
+ }
}
}
diff --git a/tests/Framework/Mime.php b/tests/Framework/Mime.php
index 1450b4f90..d767905e3 100644
--- a/tests/Framework/Mime.php
+++ b/tests/Framework/Mime.php
@@ -41,6 +41,7 @@ class Framework_Mime extends PHPUnit_Framework_TestCase
21 => '"test test"@domain.tld',
// invalid (#1489092)
22 => '"John Doe @ SomeBusinessName" <MAILER-DAEMON>',
+ 23 => '=?UTF-8?B?IlRlc3QsVGVzdCI=?= <test@domain.tld>',
);
$results = array(
@@ -68,6 +69,7 @@ class Framework_Mime extends PHPUnit_Framework_TestCase
21 => array(1, '', '"test test"@domain.tld'),
// invalid (#1489092)
22 => array(1, 'John Doe @ SomeBusinessName', 'MAILER-DAEMON'),
+ 23 => array(1, 'Test,Test', 'test@domain.tld'),
);
foreach ($headers as $idx => $header) {