Ticket #1486214 (closed Bugs: fixed)

Opened 11 months ago

Last modified 11 months ago

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
Cc:

Description

Version 0.3 Stable

Problem:

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

BEGIN:VCARD FN: Space Committee N: Space Committee EMAIL;INTERNET: Space@… END:VCARD

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".

Solution:

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).

<?php function format_email_recipient($email, $name=)

{ $email = trim($email); // trim all addresses here if ($name && $name != $email)

?>

Change History

Changed 11 months ago by alec

  • milestone changed from later to 0.3.1

Changed 11 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

Fixed in r3033.

Note: See TracTickets for help on using tickets.