Closed Bug 1726305 Opened 2 years ago Closed 2 years ago

jar:file/// protocol URLs no longer work from the address bar

Categories

(Firefox :: Address Bar, defect, P2)

Firefox 91
defect
Points:
3

Tracking

()

VERIFIED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- fixed
firefox91 --- wontfix
firefox92 --- wontfix
firefox93 --- verified

People

(Reporter: ke5trel, Assigned: daisuke)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

STR:

  1. Try to visit jar:file///PATH/omni.ja!/ from the address bar (replace PATH with Firefox install folder).

Expected:

Address bar action is "Visit" and opens the file directory for the omni.ja archive.

Actual:

Address bar action is "Search with" and sends URL to search engine.

It still searches even with keyword.enabled = false.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=28e04a08d2e42d3579b28b36becda67d945d6abe&tochange=1a7ab6a8f1adbbecf5dead68a7fa3a92c2fd958c

Regressed by Bug 1580881.

(In reply to Kestrel from comment #0)

It still searches even with keyword.enabled = false.

Are you sure about this part? I can reproduce the "Visit" part but not this on the latest Nightly. It would be surprising and bad if we somehow broke that. If it really is broken for you, does it depend on what PATH is?

Flags: needinfo?(ke5trel)

Correction: jar:file/// should be jar:file:///.

The issue can be seen with the most simplified path and the omni.ja file does not need to exist:

jar:file:///omni.ja!/

The action is "Visit" while being typed until the last trailing slash changes it to "Search with" despite keyword.enabled = false. Before Bug 1580881 it remained as "Visit".

Flags: needinfo?(ke5trel)

Thanks, I can reproduce that.

Daisuke, bug 1580881 has been identified as the regressing bug, so could you take a look at this please? If you're busy with other things please let me know and I can investigate.

Severity: -- → S3
Points: --- → 3
Flags: needinfo?(daisuke)
Priority: -- → P2

Thank you very much for finding this.
I also can reproduce it, and also confirmed that bug 1580881 causes.
I will take this.

Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Flags: needinfo?(daisuke)
Attachment #9237138 - Attachment description: Bug 1726305: Avoid throwing NS_ERROR_FAILURE of asciiHost. → Bug 1726305: Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI.
Pushed by dakatsuka.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9919a10e41e9
Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
Flags: in-testsuite+

I've managed to reproduce the issue using 'jar:file:///PATH/omni.ja!/' string and Firefox nightly build from 08-18-2021.
The issue is verified fixed using the latest Fx93.0a1 on Windows 10 and Ubuntu 20.04. Using the above mentioned address, the file location is correctly displayed in Firefox, there is NO search done using the default search engine.

Status: RESOLVED → VERIFIED

Is this something we should consider taking on ESR91?

Flags: needinfo?(daisuke)

Yeah, I think so.

Flags: needinfo?(daisuke)

To do that, what should I do?

Flags: needinfo?(ryanvm)

Set the approval-mozilla-esr91 dropdown to ? on https://bugzilla.mozilla.org/attachment.cgi?id=9237138&action=edit and answer the questions that get filled in.

Flags: needinfo?(ryanvm)

Okay, thanks!

Comment on attachment 9237138 [details]
Bug 1726305: Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Firefox 90 introduced a regression that means that users can no longer access jar: URLs from the address bar.
  • User impact if declined: User can't see the content of the URL whose protocol is jar:.
  • Fix Landed on Version: 93
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This change is only a few lines, we just wrap a place where happens an error with try/catch.
  • String or UUID changes made by this patch: No
Attachment #9237138 - Flags: approval-mozilla-esr91?

Comment on attachment 9237138 [details]
Bug 1726305: Avoid throwing NS_ERROR_FAILURE when referring to the host in nsIURI.

Approved for 91.2esr.

Attachment #9237138 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.