Skip to content

Commit

Permalink
Don't normalize the email addresses toLower.
Browse files Browse the repository at this point in the history
We don't do this anywhere else, technically address parts are case
sensitive, and this can cause freebusy information to be unavailable
when querying systems that ARE case sensitive, like Turba.

See Bug: 12505
  • Loading branch information
mrubinsk committed Nov 23, 2013
1 parent de5f41f commit b12876e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions kronolith/lib/Api.php
Expand Up @@ -1241,7 +1241,6 @@ public function updateAttendee($response, $sender = null)

$found = false;
$error = _("No attendees have been updated because none of the provided email addresses have been found in the event's attendees list.");
$sender_lcase = Horde_String::lower($sender);

foreach ($atnames as $index => $attendee) {
if ($response->getAttribute('VERSION') < 2) {
Expand All @@ -1250,14 +1249,14 @@ public function updateAttendee($response, $sender = null)
continue;
}

$attendee = Horde_String::lower($addr_ob->bare_address);
$attendee = $addr_ob->bare_address;
$name = $addr_ob->personal;
} else {
$attendee = str_replace('mailto:', '', Horde_String::lower($attendee));
$attendee = str_replace('mailto:', '', $attendee);
$name = isset($atparms[$index]['CN']) ? $atparms[$index]['CN'] : null;
}
if ($event->hasAttendee($attendee)) {
if (is_null($sender) || $sender_lcase == $attendee) {
if (is_null($sender) || $sender == $attendee) {
$event->addAttendee($attendee, Kronolith::PART_IGNORE, Kronolith::responseFromICal($atparms[$index]['PARTSTAT']), $name);
$found = true;
} else {
Expand Down
3 changes: 1 addition & 2 deletions kronolith/lib/Event.php
Expand Up @@ -2460,7 +2460,7 @@ public function getLocation($user = null)
*/
public function hasAttendee($email)
{
return isset($this->attendees[Horde_String::lower($email)]);
return isset($this->attendees[$email]);
}

/**
Expand All @@ -2476,7 +2476,6 @@ public function hasAttendee($email)
*/
public function addAttendee($email, $attendance, $response, $name = null)
{
$email = Horde_String::lower($email);
if ($attendance == Kronolith::PART_IGNORE) {
if (isset($this->attendees[$email])) {
$attendance = $this->attendees[$email]['attendance'];
Expand Down

0 comments on commit b12876e

Please sign in to comment.