Closed Bug 1636673 Opened 4 years ago Closed 4 years ago

when a search term has "/" as the first character, upon pressing enter the address bar prepends "http:/" and visits a website instead of searching

Categories

(Firefox :: Address Bar, defect, P3)

76 Branch
defect

Tracking

()

VERIFIED FIXED
Firefox 78

People

(Reporter: mjzdvzitpwynxjoipa, Unassigned)

References

Details

Attachments

(1 file)

Attached video 16-09-11.mp4

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

typed /a (or any alpha character following a slash) in the address bar.

Actual results:

the address bar prepended http/ before my search string and appended a slash. upon pressing enter a website (e.g. www.a.com) was visited.

Expected results:

the search strings should have been submitted to the search engine.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Search
Component: Search → Address Bar

also happens when an alpha character followed by a slash is typed in the address bar. https://www.dropbox.com/s/seao4bfy4jd5wcc/19-35-08.mp4?dl=0

Because this bug's Severity is normal and has not been changed, and this bug's priority is -- (none,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

I think this is because Services.io.newURI("http:///a").spec == "http://a/". URIFixup::fixupURIProtocol takes the original strings, adds "http://" in front and checks whether it's a valid uri, and in this case it is valid. That's of course sub-optimal.

Blocks: 1180329
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

fixed by bug 1398567.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78

The issue is verified fixed using Fx78.0RC and Fx79.0a1 on windows. Typing /word now correctly triggers a search.
On ubuntu and macOS however this is not case. Typing /a prompts the browser to open a file.
@Marco Is the fix intended only for windows?

Status: RESOLVED → VERIFIED
Flags: needinfo?(mak)

yes, on Unix systems /something is a valid file url

Flags: needinfo?(mak)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: