Opened 6 years ago

Closed 6 years ago

#1486214 closed Bugs (fixed)

Email recipient address not trimmed

Reported by: p.sunthar Owned by:
Priority: 5 Milestone: 0.3.1
Component: Addressbook Version: 0.3-stable
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 (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)


Change History (2)

comment:1 Changed 6 years ago by alec

  • Milestone changed from later to 0.3.1

comment:2 Changed 6 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [a9bfe21b].

Note: See TracTickets for help on using tickets.