diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-10-21 13:34:49 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-10-21 13:34:49 +0200 |
commit | a649e0488a8913f73443390703692e96767ab871 (patch) | |
tree | 5a82eb5729b9fc0c04bf10dff0d6717e81d4087b | |
parent | 99d59620e143ff7ff6424eded4c290319cf8b8db (diff) |
Fix failing vCard import when email address field contains spaces (#1489386)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_vcard.php | 4 |
2 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix failing vCard import when email address field contains spaces (#1489386) - Fix default spell-check configuration after Google suspended their spell service - Fix vulnerability in handling _session argument of utils/save-prefs (#1489382) - Fix iframe onload for upload errors handling (#1489379) diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php index b04479315..5f74ccbd4 100644 --- a/program/lib/Roundcube/rcube_vcard.php +++ b/program/lib/Roundcube/rcube_vcard.php @@ -617,8 +617,8 @@ class rcube_vcard $enc = null; foreach($regs2[1] as $attrid => $attr) { + $attr = preg_replace('/[\s\t\n\r\0\x0B]/', '', $attr); if ((list($key, $value) = explode('=', $attr)) && $value) { - $value = trim($value); if ($key == 'ENCODING') { $value = strtoupper($value); // add next line(s) to value string if QP line end detected @@ -797,7 +797,7 @@ class rcube_vcard return $result; } - $s = strtr($s, $rep2); + $s = trim(strtr($s, $rep2)); } // some implementations (GMail) use non-standard backslash before colon (#1489085) |