Closed Bug 1301186 Opened 5 years ago Closed 5 years ago

Email invitation may not be displayed when description contains non ascii characters

Categories

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

Lightning 4.7.2
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: MakeMyDay)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160726073904

Steps to reproduce:

Create an event and add yourself (best with a differen mail adress) as participant. Add "+/-" to the description and save the event.
A mail with a ics is generated and sent to your other mail adress.
Open that mail with thunderbird with installed lightning.


Actual results:

The event invitation is not displayed.


Expected results:

The event invitation should be displayed.

The Problem is that .kGlyphSubstitution is used with scanHTML (file ltnInvitationUtils.jsm line 98) which produces non-standard HTML (see ). Removing this line solves the problem.
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Assignee: nobody → makemyday
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: certain ics requests can not be displayed → Email invitation may not be displayed when description contains non ascii characters
This patch takes care. I'm not removing kGlyphSubstitution mode because in most cases it works properly to convert smilies. Long term, we may make use of the chat implementation for that, but for now this is sufficient that way.

This needs to go up to esr, although we unfortunately missed the train for 4.7.4.
Attachment #8795730 - Flags: review?(philipp)
Attachment #8795730 - Flags: approval-calendar-esr?(philipp)
Attachment #8795730 - Flags: approval-calendar-beta?(philipp)
Attachment #8795730 - Flags: approval-calendar-aurora?(philipp)
Comment on attachment 8795730 [details] [diff] [review]
FixNonAsciiCharacterProblemInInvitationPreview-V1.diff

Review of attachment 8795730 [details] [diff] [review]:
-----------------------------------------------------------------

The IDL says that kGlyphSubstitution should not be used with scanHTML at all. Maybe we should just remove it? Or does something speak for keeping it? 

Also, I'd appreciate if you could add a test that attempts to add a <script> tag or <img onerror="evil()"/>.

r/a=philipp with these changes
Attachment #8795730 - Flags: review?(philipp)
Attachment #8795730 - Flags: review+
Attachment #8795730 - Flags: approval-calendar-esr?(philipp)
Attachment #8795730 - Flags: approval-calendar-esr+
Attachment #8795730 - Flags: approval-calendar-beta?(philipp)
Attachment #8795730 - Flags: approval-calendar-beta+
Attachment #8795730 - Flags: approval-calendar-aurora?(philipp)
Attachment #8795730 - Flags: approval-calendar-aurora+
Ah I read your comment now. Fine for me to keep kGlyphSubstitution then.
https://hg.mozilla.org/comm-central/rev/150b63fa66ecd865927c8c34e22e3e88f2608e04
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 5.4
Whiteboard: [update target milestone: 4.7.5]
Target Milestone: 5.2 → 4.7.5
You need to log in before you can comment on or make changes to this bug.