Closed Bug 359712 Opened 18 years ago Closed 18 years ago

[proto event dialog] bad handling of attendees (entry corruption)

Categories

(Calendar :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: WSourdeau, Assigned: michael.buettner)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2) Whenever a task is created from an external application and has its attendees description beginning with "MAILTO:" (in uppercase), Lightning-WCAP does not recognize the "MAILTO:" and prepend "mailto:" to the string, corrupting the entry. The problem happens in sun-calendar-event-dialog-attendees.xml, of the nightly snapshot of lightning-WCAP from 2006-10-24. Reproducible: Always The following patch fixes this problem by detecting the "mailto:" entry without regard for its case: diff -durpN t/content/calendar/sun-calendar-event-dialog-attendees.xml t1/content/calendar/sun-calendar-event-dialog-attendees.xml --- t/content/calendar/sun-calendar-event-dialog-attendees.xml 2006-09-05 08:27:16.000000000 -0400 +++ t1/content/calendar/sun-calendar-event-dialog-attendees.xml 2006-11-06 14:36:07.000000000 -0500 @@ -322,9 +322,11 @@ var inputValue = aAttendee.commonName; var email = aAttendee.id; if(email && email.length) { - if (email.indexOf("mailto:") == 0) - email = email.split("mailto:")[1] - inputValue += ' <'+email+'>'; + var emailRe = new RegExp("^mailto:(.*)", "i"); + if (emailRe.test(email)) + inputValue += ' <' + RegExp.$1 + '>'; + else + inputValue += ' <' + email + '>'; } // remove leading spaces @@ -483,9 +485,9 @@ // to look like an email-address, we prepend the prefix. // this also allows for non-email-addresses. var email = emailAddresses.value[0]; - if (email.indexOf("mailto:") != 0) + if (email.toLowerCase().indexOf("mailto:") != 0) if (email.indexOf("@") >= 0) - email = "mailto:" + email; + email = "MAILTO:" + email; attendee.id = email; } if(names.value.length > 0) { @@ -549,9 +551,9 @@ // to look like an email-address, we prepend the prefix. // this also allows for non-email-addresses. var email = emailAddresses.value[0]; - if (email.indexOf("mailto:") != 0) + if (email.toLowerCase().indexOf("mailto:") != 0) if (email.indexOf("@") >= 0) - email = "mailto:" + email; + email = "MAILTO:" + email; attendee.id = email; } if(names.value.length > 0) { @@ -596,9 +598,9 @@ // to look like an email-address, we prepend the prefix. // this also allows for non-email-addresses. email = emailAddresses.value[0]; - if (email.indexOf("mailto:") != 0) + if (email.toLowerCase().indexOf("mailto:") != 0) if (email.indexOf("@") >= 0) - email = "mailto:" + email; + email = "MAILTO:" + email; } var isdirty = false;
Over to Daniel since it's a prototype event dialog thing. It would be interesting to know if the standard event dialog also suffers from this.
Assignee: nobody → daniel.boelzle
Over to Mickey.
Assignee: daniel.boelzle → michael.buettner
Component: Provider: WCAP → General
QA Contact: wcap-provider → general
Summary: bad handling of attendees (entry corruption) → [proto event dialog] bad handling of attendees (entry corruption)
Daniel and/or Mickey, has this bug been checked in? It is still listed as critical and a patch was available since november...
Severity: critical → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Attached patch patch v1Splinter Review
Admittedly, I completely lost this issue from my radar. Please feel free to keep poking me in case this should happen with any further patch or issue. I attached the proposed changes as a final patch with all the necessary modifications. There were several bits and pieces missing from the original patch, probably because there were changes to the dialog code itself. Anyway, this version of the patch is what is going to be checked in.
Checked in on trunk and MOZILLA_1_8_BRANCH -> FIXED
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: