Accept / Refuse mails notifications are not sent sometimes (because of case sensitive comparison between identity and attendee mail)
Categories
(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)
Tracking
(thunderbird_esr115 affected)
Tracking | Status | |
---|---|---|
thunderbird_esr115 | --- | affected |
People
(Reporter: merome, Assigned: gumara-dev)
References
Details
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0
Steps to reproduce:
- From the mail client of your choice, send a calendar invitation to a TB user, let's say : firstname.lastname@domain.com
- As this TB user and from TB 115.6.0 (64 bits), accept the invitation and send a notification to the organizer, client-side scheduling is on, but the user's identity is written like that in thunderbird : Firstname.LASTNAME@domain.com
- Check the sent folder of the TB user
Actual results:
Accept and refuse notifications are not sent if the email address figuring in the attendee list of the invitation is not EXACTLY the same than the TB identity mail, case sensitive.
No error is displayed, and nothing could make you think your response has not been sent (you can only see that the sent folder does not contain your response).
Expected results:
The acceptation notification should be sent when attendee mail and TB identity mail are equals, case INsensitive.
If you add an identity corresponding to the attendee list, acceptation notification is actually sent, but you can't guess what the organizer will use as attendee mail for you : FIRSTNAME.LASTNAME@domain.COM or FIrstname.LAstname@domain.com, users are very inventive...
It's a silent bug, hard to detect, but extremely annoying for users.
Maybe related to https://bugzilla.mozilla.org/show_bug.cgi?id=1798268
After some other tests, I should add this precision :
It's not the identity mail address that should be exactly the same as the attendee email, but the calendar associated email.
I did some research on the source code and found this function :
attendeeMatchesAddresses(aRefAttendee, aAddresses) {
let attId = aRefAttendee.id;
if (!attId.match(/^mailto:/i)) {
// Looks like its not a normal attendee, possibly urn:uuid:...
// Try getting the email through the EMAIL property.
const emailProp = aRefAttendee.getProperty("EMAIL");
if (emailProp) {
attId = emailProp;
}
}
attId = attId.toLowerCase().replace(/^mailto:/, "");
for (const address of aAddresses) {
if (attId == address.toLowerCase().replace(/^mailto:/, "")) {
return true;
}
}
return false;
},
This function is called by buildOutgoingMessages() and should do the job case insensitive, but it's not working.
I have a calendar with this email address MYNAME@mydomain.com (uppercase) which is also in identities.
From Google I invite myname@mydomain.com (lowercase) to an event.
I receive the invitation, and I can accept it, choosing in which calendar I want to save it. The event is added to the calendar, but the acceptation is not sent. No error. Nothing in sent folder. Nothing in Google mailbox.
Assignee | ||
Comment 2•10 months ago
|
||
Found the real problem, see calItipUtils.sys.mjs:
identity => identity.email == email
Only a simple check takes place here, the better code could be the following, for example:
identity => identity.email.toLowerCase() == email.toLowerCase()
Assignee | ||
Comment 3•10 months ago
|
||
Comment 4•10 months ago
|
||
Can you submit through phabricator? See https://developer.thunderbird.net/thunderbird-development/fixing-a-bug#submitting-a-patch
(Also, you can to the first lowercase where you assign email at first.)
Assignee | ||
Comment 5•10 months ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #4)
Can you submit through phabricator? See https://developer.thunderbird.net/thunderbird-development/fixing-a-bug#submitting-a-patch
(Also, you can to the first lowercase where you assign email at first.)
I will try it.
Assignee | ||
Comment 6•10 months ago
|
||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/e4064f035b79
Fixing the sometimes not sent e-mail about the acceptance/rejection of appointments r=mkmelin
Description
•