Closed Bug 1540663 Opened 6 years ago Closed 6 years ago

Clicking on links in email messages doesn't work in nightly

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 68.0

People

(Reporter: 52qtuqm9, Assigned: mkmelin)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

As of 2019-03-31 nightly build, when I click on a link in an email message, nothing happens, and this error gets logged in the error console:

NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI] contentAreaClick.js:182
openLinkExternally chrome://communicator/content/contentAreaClick.js:182
contentAreaClick chrome://communicator/content/contentAreaClick.js:165
onclick chrome://messenger/content/messenger.xul:1

Please remember to mark regressions as such.

Assignee: nobody → mkmelin+mozilla
Keywords: regression
Blocks: 1476428
Component: General → Mail Window Front End
Product: MailNews Core → Thunderbird
Attached patch bug1540663_click_fail.patch (obsolete) — Splinter Review

I'll add more tests for this in another bug. Would be good to get this into nightly.

Attachment #9055042 - Flags: review?(jorgk)
Status: NEW → ASSIGNED
Comment on attachment 9055042 [details] [diff] [review] bug1540663_click_fail.patch Review of attachment 9055042 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/content/phishingDetector.js @@ +35,5 @@ > this.mDisallowFormActions = Services.prefs.getBoolPref("mail.phishing.detection.disallow_form_actions"); > }, > > /** > + * Analyzethe currently loaded message in the message pane, looking for signs Missing space. @@ +46,3 @@ > * > + * @return asynchronously calls gMessageNotificationBar.setPhishingMsg if the > + * message is identified as a scam. Indent one to the left. @@ +197,5 @@ > */ > warnOnSuspiciousLinkClick(aUrl, aLinkText) { > + if (!this.analyzeUrl(aUrl, aLinkText)) { > + return 2; // No problem with the url. Allow it to load. > + } I can't say that I understand the reshuffle, but the function now never returns 0 any more.

As per IRC: 10:49:10 - mkmelin: no, it does return 0, if you end up with a confirmEx and the user choses 0

The most important part of the reshuffle is that we now analyse first. Then we must make sure the aLinkText is actually an url (since the method is called for all urls), or we try to make arbitrary text a url and that fails of course.

Attachment #9055042 - Attachment is obsolete: true
Attachment #9055042 - Flags: review?(jorgk)
Attachment #9055050 - Flags: review?(jorgk)
Comment on attachment 9055050 [details] [diff] [review] bug1540663_click_fail.patch Review of attachment 9055050 [details] [diff] [review]: ----------------------------------------------------------------- ::: mail/base/content/phishingDetector.js @@ +202,3 @@ > let bundle = document.getElementById("bundle_messenger"); > > + // Analysis said there's a problem. Link mismatch then? "Link mismatch then?" is confusing. The comment suggests that you're going to test for a mismatch, but analyzeUrl() already did. I suggest to remove that part of the comment. @@ +202,4 @@ > let bundle = document.getElementById("bundle_messenger"); > > + // Analysis said there's a problem. Link mismatch then? > + if (aLinkText && /^https?:/.test(aLinkText)) { There is an i for case-insensitive match missing here. Other parts of the code use xxx.schemeIs("http") || xxx.schemeIs("https")
Attachment #9055050 - Flags: review?(jorgk) → review+

schemeIs can only be used for URIs, not strings.
I've updated the comment.

I think some more refactoring would make sense in this file, but... for another bug.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/5db9b0e6efd1
Restore clicking on links in email messages to working order after bug 1476428. r=jorgk

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Due to the time constraints, I landed it with the changes I had suggested, so with the "i" and the comment removed. Next time, please make yourself available on IRC.

Target Milestone: --- → Thunderbird 68.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: