Closed Bug 1696300 Opened 3 years ago Closed 3 years ago

about:certificate links to PEM files broken

Categories

(Thunderbird :: Mail Window Front End, defect)

Thunderbird 86
defect

Tracking

(thunderbird_esr78 unaffected)

RESOLVED FIXED
88 Branch
Tracking Status
thunderbird_esr78 --- unaffected

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(2 files)

+++ This bug was initially created as a clone of Bug #1675730 +++

No longer depends on: 1675730

(In reply to Magnus Melin [:mkmelin] from bug 1675730 comment 5)

Geoff, on trunk this is erroring out due to e10s. https://searchfox.org/comm-central/rev/dc208bc3dc9ed27f25fa2529b492973856624fd3/mail/base/actors/LinkHandlerChild.jsm#96 - we have an about page linking to a data: url.
Using .host or Services.eTLD.getBaseDomain for non-http urls will not work. But I'm not sure what the solution is. Just returning if it's not http doesn't open the data url.

While that's a real problem, it's not the problem here. If an exception is thrown in the LinkHandlerChild function then normal link handling will continue. The only change in behaviour occurs if we get to the bottom of the function and call event.preventDefault().

(Incidentally, the LinkHandler actor doesn't even fire in parent-process about: pages, which I didn't know until today. The certificate viewer works in a child process though.)

The problem here is something to do with <a download=""> links, which the links to certificate files are. In 78 or with E10s disabled, they work in the cert viewer but not in web pages. With E10s enabled, they don't appear to work at all. I don't know why.

Hmm, that's not entirely true either.

In web pages, links to HTTP URLs with the download attribute still work as intended in web pages, which wasn't true in 78. Data URLs do nothing. The link handler has no effect.

In the cert viewer, links to HTTP URLs with the download attribute load the URL in the browser, which is wrong. Data URLs do nothing here too.

Aha! There's a hack which makes this work. That's not going to work with a remote browser.

The question I now have is: why is there a hack? This should work without it. I can't get data URLs to download anywhere, which is weird because they should work. They work in Firefox.

Depends on: 1696586

This no longer works with remote processes enabled and is no longer necessary with bug 1696586 fixed.

Depends on D107317

Avoids redirecting to an external browser for links that have the download attribute, and catches an exception if either the page or link are from a host-less URL scheme.

Depends on D107318

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/96857e7236f6
Remove special page handler for about:certificate. r=mkmelin
https://hg.mozilla.org/comm-central/rev/b85464ee259f
Fix two problems with the single-site link handler. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: