Page MenuHomePhorge

Failure to map attendee responses to invited attendees in Roundcube
Closed, ResolvedPublic

Description

When creating a meeting with attendees in Roundcube,, one can add an attendee using his manually inserted email address such as first.last@example.com
If this attendee responds by accepting the invitation, it may happen that the response is sent from "First Last <First.Last@Example.com>".

Roundcube then fails to correctly map the attendees response to the originally invited attendee. The result is that the meeting now has an additional attendee with the capitalized email address. In an effort to track down the source of the problem, it seems that it originates from two issues:

  • the regex used in plugins/libcalendaring/libcalendaring.php to extract an email address fails on addresses in the form of "First Last <first.last@example.com>"
  • additionally, in plugins/calendar/calendar.php, the check to determine if the received participation status belongs to an existing attendee uses case sensitive email comparison (instead of case insensitive)

I am however not sure if these are the only causes of problems concerning the described scenario. Proposed fix is to use a different regex (such as the one to be found at http://emailregex.com/ which seems to work well) and to make the mentioned email comparison case insensitive.

Software versions: Kolab latest official on CentOS latest official

$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

$ rpm -qv roundcubemail
roundcubemail-1.2-4.4.el7.kolab_16.noarch

Details

Ticket Type
Task

Event Timeline

Sounds like a duplicate of T1301. Could you confirm it fixes the issue?

Yes, this is definitely a duplicate of T1301. However, the solution suggested there is only a partial fix, i.e. the case insensitive email comparison is fixed, but the regex used to match email addresses is still broken.

Using this in plugins/libcalendaring/libcalendaring.php works well for me:

private static $email_regex = '/((?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){255,})(?!(?:(?:\x22?\x5C[\x00-\x7E]\x22?)|(?:\x22?[^\x5C\x22]\x22?)){65,}@)(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22))(?:\.(?:(?:[\x21\x23-\x27\x2A\x2B\x2D\x2F-\x39\x3D\x3F\x5E-\x7E]+)|(?:\x22(?:[\x01-\x08\x0B\x0C\x0E-\x1F\x21\x23-\x5B\x5D-\x7F]|(?:\x5C[\x00-\x7F]))*\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\])))/iD';