diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-09 09:53:37 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-08-09 09:53:37 +0000 |
| commit | 6130f70fa7c582481bf0dce8b429aaacfc1e21ff (patch) | |
| tree | 3601d8e02a7076d43ee08d9288223ac841361e88 | |
| parent | 1cafcd459a642c1a69ce233f22ff2858611eff21 (diff) | |
- Fix handling of email addresses with quoted local part (#1487939)
git-svn-id: https://svn.roundcube.net/trunk@5034 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.php | 2 | ||||
| -rw-r--r-- | roundcubemail/tests/maildecode.php | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_imap.php b/roundcubemail/program/include/rcube_imap.php index 5fbf3ad54..e31fb887e 100644 --- a/roundcubemail/program/include/rcube_imap.php +++ b/roundcubemail/program/include/rcube_imap.php @@ -4772,7 +4772,7 @@ class rcube_imap $address = $m[2]; $name = trim($m[1]); } - else if (preg_match('/^(\S+@\S+)$/', $val, $m)) { + else if (preg_match('/^('.$email_rx.')$/', $val, $m)) { $address = $m[1]; $name = ''; } diff --git a/roundcubemail/tests/maildecode.php b/roundcubemail/tests/maildecode.php index ef3d18246..7d67352c3 100644 --- a/roundcubemail/tests/maildecode.php +++ b/roundcubemail/tests/maildecode.php @@ -46,6 +46,8 @@ class rcube_test_maildecode extends UnitTestCase 18 => '"Test,Test" <test@domain.tld>', // 1487939 19 => 'Test <"test test"@domain.tld>', + 20 => '<"test test"@domain.tld>', + 21 => '"test test"@domain.tld', ); $results = array( @@ -69,6 +71,8 @@ class rcube_test_maildecode extends UnitTestCase 17 => array(1, '', 'test@domain.tld'), 18 => array(1, 'Test,Test', 'test@domain.tld'), 19 => array(1, 'Test', '"test test"@domain.tld'), + 20 => array(1, '', '"test test"@domain.tld'), + 21 => array(1, '', '"test test"@domain.tld'), ); foreach ($headers as $idx => $header) { |
