Closed Bug 1397548 Opened 3 years ago Closed 3 years ago

fails to try attempt to navigate to (actually any subdomain starting with http) in address bar


(Firefox :: Address Bar, defect)

57 Branch
Not set



Firefox 57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- unaffected
firefox57 + verified


(Reporter: mark, Assigned: ehsan)



(Keywords: regression)


(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170906100107

Steps to reproduce:

Enter in address bar and press enter or click the go arrow button.  Actually it seems as any subdomain starting with http causes this issue (,,,  You have to enter the http:// protocol prefix to navigate to or get a dns error page for the invalid hosts).

Actual results:

Nothing.  If you are on a currently loaded page when this happens, it just shows the current page's url again with no navigation. 

Expected results:

It should try to navigate to the address typed in the address bar.
[Tracking Requested - why for this release]: regression about navigation from location bar

I can reproduce the problem and an error is shown in Browser Console when press [Enter]:

NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService2.newURI] 1 RemoteWebNavigation.js:20

Regression window:

Regressed by:Bug 1383299

Your patch seems cause the problem, could you look this?
Blocks: 1383299
Component: Untriaged → Address Bar
Ever confirmed: true
Flags: needinfo?(ehung)
Keywords: regression
This is caused by this condition:

This causes us to try to run makeURI() with an argument like "" which fails to parse as a URI.

I think a good solution is to be smart on two levels, first is to check for strings starting with "http:" and "https:", and also to wrap the entire block in a try/catch in case makeURI throws since we can't have any guarantees on what the user types into the location bar.
Assignee: nobody → ehsan
Attached patch Patch (v1)Splinter Review
Flags: needinfo?(ehung)
Attachment #8905354 - Flags: review?(mconley)
Thank Ehsan for the patch! :)
Assignee: ehsan → ehung
(Sorry I was going to take the bug and forget to clear this before sending the comment above.....)
Assignee: ehung → ehsan
Comment on attachment 8905354 [details] [diff] [review]
Patch (v1)

Review of attachment 8905354 [details] [diff] [review]:

Great, thanks ehsan!
Attachment #8905354 - Flags: review?(mconley) → review+
Pushed by
Correctly deal with deceptively URI-looking content entered into the location bar in RemoteWebNavigation.loadURIWithOptions(); r=mconley
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
I have reproduced this bug with Nightly 57.0a1 (2017-09-06) on Windows 8.1 , 64 Bit ! 

This bug's fix is Verified with latest Beta 57.0b3 !

Build   ID    20170925150345
User Agent    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0
QA Whiteboard: [bugday-20170927]
I have reproduced this bug with Nightly 57.0a1 (2017-09-06) (64-bit) on Ubuntu 16.04 LTS!

This bug's fix is Verified with latest Beta!

Build   ID    20170925150345
User Agent    Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0

As par Comment 9 & Comment 10 , I am marking this bug as Verified Fixed !
You need to log in before you can comment on or make changes to this bug.