Open Bug 1439215 Opened 8 years ago Updated 1 month ago

Cannot accept invitations from a google account (special chars like @google.com in event UID get encoded twice)

Categories

(Calendar :: E-mail based Scheduling (iTIP/iMIP), defect)

Lightning 5.4.6
defect

Tracking

(Not tracked)

People

(Reporter: konrad.hammerer, Unassigned, Mentored)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20180206200532 Steps to reproduce: When I get a mail with an invite from another google account, I see all the buttons (accept, decline, ...) but accepting the invite does not show a popup where I can send an "accepted" mail back to the sender. The appointment is added to my calender, but no mail is sent back. This works OK with other invites (not from google). When I go the my calender and hit refresh, the appointment shows up and when I change the status from "I accept" to "I decline", I suddenly get the popup which asks me if I want to send a mail back to the sender. This should have happened while accepting the invite from within my inbox. I'm using a caldav calender hosted on my own server (just in case this is relevant). Actual results: Accepting an invite directly from within my inbox results in the following: The appointment is added to my calendar, but no mail is send back to the sender (no popup shows up) if the original mail comes from a google account. Expected results: A popup should show up asking me if I want to send a feedback mail back to the sender (telling him if I accepted or declined).
Component: Lightning Only → E-mail based Scheduling (iTIP/iMIP)

When clicking on "Accept", Thunderbird/Lightning properly sends a PUT request. Then, it calls a REPORT query (to verify that the creation was sucessful?).

But some event UID might contain special characters. In this case, those characters should be encoded. The bug is here: special characters are encoded twice. This results in an incorrect REPORT query

For example, the following UID:
0qde444fc40n1to5j1j6tsee2l@google.com
should be encoded into:
0qde444fc40n1to5j1j6tsee2l%40google.com

But the actual UID to be searched in the REPORT query is:
0qde444fc40n1to5j1j6tsee2l%2540google.com
Note that the "percent" symbol was encoded into %25.

After digging for long, I managed to fix this, by modifying the getItemLocationPath function in calDavCalendar.js:574:

574c574
<       return this.mItemInfoCache[aItem.id].locationPath;
---
>       return this.ensureDecodedPath(this.mItemInfoCache[aItem.id].locationPath);

It's good to hear to you were able to finally find the root cause for this issue. Let me know in which version the fix will be available...

Thanks
Konrad

Sorry, but I don't know how to push my change to master development branches. (I don't even know where they are...)
Can someone review this change and commit it to source?

Attached patch 1439215.patch — — Splinter Review
Attachment #9189682 - Flags: review?(philipp)

(In reply to Ruliane from comment #3)

Sorry, but I don't know how to push my change to master development branches. (I don't even know where they are...)
Can someone review this change and commit it to source?

Hi Ruliane, we are very sorry for not having noticed your question from 3 weeks back. It's easy to overlook things between tons of bugmail. The best way of ensuring someone's attention is using needinfo checkbox below comment input: [ ] Request information from... and then you pick a person by their name or nick, e.g. :martinschroeder who updated this bug between comment 0 and comment 1, or Philipp aka :fallen whom you correctly chose as a reviewer.

Next step: Let's make your patch apply (see my next comments).

Comment on attachment 9189682 [details] [diff] [review]
1439215.patch

Let's make sure that this patch has a correct header and applies to Trunk before getting reviews, to avoid extra hassles for the reviewer.

Attachment #9189682 - Flags: review?(philipp)

Assigning to Ruliane who provided her first patch attachment 9189682 [details] [diff] [review] in comment 4.

Assignee: nobody → ruliane+mozillabugzilla
Status: UNCONFIRMED → NEW
Ever confirmed: true

(In reply to Ruliane from comment #3)

Sorry, but I don't know how to push my change to master development branches. (I don't even know where they are...)

Thank you very much for digging into the code in order to fix this problem! You rock!

If you want, the next step is to make your patch apply to the master development branch aka "Trunk".

  • Find more information here (including how to build TB if you so wish): https://www.thunderbird.net/en-US/get-involved/#development
  • Master dev branch lives here: https://hg.mozilla.org/comm-central
  • Search (almost) current trunk code here: https://searchfox.org/comm-central/search?q=CalDavCalendar.jsm (file was renamed)
  • For simple local testing, use the "Thunderbird Daily" release channel [1]. In TB Daily program folder, rename omni.ja to omni.zip and unpack into same folder, edit flat source files, restart Daily to test your changes (works for all .js(m) and .xhtml files).
  • A simple way on Windows to create patches without building:
    • install TortoiseHg: https://tortoisehg.bitbucket.io/
    • File > Clone Repository > Source: https://hg.mozilla.org/comm-central, Target (your choice, e.g.): C:\mozhg\comm-central > Clone
      hg clone --verbose https://hg.mozilla.org/comm-central "C:\mozhg\comm-central"
    • View > Commit, then from Commit | v button dropdown, choose Create new patch (using View > Show patch queue is convenient)
    • Apply changes to source of your cloned repository, qrefresh | v, click Options button near Commit | v button to "Set username" to yourself (Display Name <email>). Ideally, 8 lines of patch context.

[1]http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-comm-central/

Comment on attachment 9189682 [details] [diff] [review] 1439215.patch Review of attachment 9189682 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to Thomas D. (:thomas8) from comment #8) > (In reply to Ruliane from comment #3) > > Sorry, but I don't know how to push my change to master development branches. (I don't even know where they are...) > > Thank you very much for digging into the code in order to fix this problem! You rock! Thank you for this patch! It cannot yet apply to Trunk: - The file has been renamed in the dev branch and line numbers have changed: https://searchfox.org/comm-central/search?q=CalDavCalendar.jsm - Needs patch header with bug reference, your name ("user") etc. - Some internal patch issues wrt wrong file names/missing paths in chunk references (+++/---) - Please use Linux line breaks (LF) - (Ideally, 8 lines of context.) **Example of a patch including this file with correct patch header and correct diff format**: https://hg.mozilla.org/comm-central/raw-rev/d499974a1e21468f82cb94c57328e66fe1070157 See my comment 8 for some starting points how to ensure that your patches will be up to date. Let me know if there are any questions, and if you're willing to try and update your patch according to the example provided above.

(In reply to Thomas D. (:thomas8) from comment #9)

Let me know if there are any questions, and if you're willing to try and
update your patch according to the example provided above.

Flags: needinfo?(ruliane+mozillabugzilla)
Summary: Cannot accept invitations from a google account → Cannot accept invitations from a google account (special chars like @google.com in event UID get encoded twice)
Mentor: bugzilla2007
Severity: normal → S3
Assignee: ruliane+mozillabugzilla → nobody
Flags: needinfo?(ruliane+mozillabugzilla)
See Also: → 2072470
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: