Closed
Bug 1462959
Opened 7 years ago
Closed 7 years ago
NS_ERROR_FAILURE from nsIURI.hostPort in LoginHelper.doLoginsMatch upon form submission if a formSubmitURL is "javascript:"
Categories
(Toolkit :: Password Manager, defect)
Toolkit
Password Manager
Tracking
()
RESOLVED
FIXED
mozilla62
People
(Reporter: MattN, Assigned: MattN)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
This breaks the password save/update doorhanger if javascript:… action is involved.
The issue is that
> Services.io.newURI("javascript:").hostPort
throws NS_ERROR_FAILURE.
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIURI.hostPort]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/LoginHelper.jsm :: doLoginsMatch :: line 229" data: no]
doLoginsMatch resource://gre/modules/LoginHelper.jsm:229:11
onFormSubmit resource://gre/modules/LoginManagerParent.jsm:385:16
receiveMessage resource://gre/modules/LoginManagerParent.jsm:89:9
receiveMessage jar:file:///Applications/FirefoxNightly.app/Contents/Resources/browser/omni.ja!/components/nsBrowserGlue.js:254:15
receiveMessage self-hosted:1027:17
Flags: qe-verify-
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8979071 [details]
Bug 1462959 - Catch exceptions accessing .hostPort for non-http/ftp schemes in LoginHelper.doLoginsMatch.
https://reviewboard.mozilla.org/r/245336/#review251860
I suppose this is strictly an improvement, but shouldn't we go the other way around and only consider URLs that can contain a host and a port? What happens if you plug in about:blank or data:text/html,<div>?
Attachment #8979071 -
Flags: review?(jhofmann) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8979071 -
Flags: review+ → review?(jhofmann)
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8979071 [details]
Bug 1462959 - Catch exceptions accessing .hostPort for non-http/ftp schemes in LoginHelper.doLoginsMatch.
https://reviewboard.mozilla.org/r/245336/#review252150
That seems better to me, thanks!
Attachment #8979071 -
Flags: review?(jhofmann) → review+
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/366a9f1b95f6
Catch exceptions accessing .hostPort for non-http/ftp schemes in LoginHelper.doLoginsMatch. r=johannh
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•