Email recipient address not trimmed
|Reported by:||p.sunthar||Owned by:|
|Severity:||normal||Keywords:||address, leading space, trim|
Version 0.3 Stable
When vCards are imported by the addressbook, the email address is not trimmed. The decoder expects the email address to immediately follow the ':' (colon) without any space(s). If there is a space then the email is inserted into the database table along with the space. It is not trimmed.
Programs such as csv2vcard.rb however insert a space in between. Example
FN: Space Committee
N: Space Committee
When an email is composed to this address it is inserted as
"Space Committee" < Space@…>
which is an invalid address, and the client asks to "specify at least one recipient".
Rewrite the vcard_decode() in rcube_vcard.php
A more general fix would be to trim all email addresses before they are sent to the client in main.inc (there by avoiding bugs of several programs that may write to the database table).
function format_email_recipient($email, $name=)
$email = trim($email); trim all addresses here
if ($name && $name != $email)