Closed
Bug 1174254
Opened 10 years ago
Closed 9 years ago
Disable FTP protocol guessing
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: oremj, Unassigned)
Details
Attachments
(1 file, 1 obsolete file)
8.35 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
If the hostname begins with "ftp.", "ftp://" will be inserted in to the URI. Let's remove that behavior, so we don't create hangs on domains which aren't listening on port 21, but begin with ftp.
![]() |
||
Comment 1•10 years ago
|
||
> so we don't create hangs on domains which aren't listening on port 21, but begin with
> ftp.
How common are such domains compared to ones that do listen on port 21?
Reporter | ||
Comment 2•10 years ago
|
||
I don't have access to the try, so this is untested.
Attachment #8621755 -
Flags: review?(dougt)
Comment 3•10 years ago
|
||
Comment on attachment 8621755 [details] [diff] [review]
bug-1174254.patch
i would like this, but I think we should just rm -rf ftp://
Attachment #8621755 -
Flags: review?(mcmanus)
Attachment #8621755 -
Flags: review?(dougt)
Attachment #8621755 -
Flags: review-
Comment 4•10 years ago
|
||
doug, let's set aside how much ftp is used (we can figure that out) and just assume that it is "once in a while".
What's your vision for what happens when ftp:// is clicked on? A front-end driven helper pointing at add-ons? How about a subresource? What about other products? I'm concerned we trade one piece of kinda-scary but in practice ok code for a matrix of usability problems on different products.
Or are we only talking about doing it if ftp is super rare? We can gather that data, but my intuition says its much more "uncommon" than "doesn't really impact people.
Flags: needinfo?(dougt)
Comment 5•10 years ago
|
||
remote: View the pushlog for these changes here:
remote: https://hg.mozilla.org/try/pushloghtml?changeset=012443c0b59f
Comment 6•10 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=012443c0b59f
409 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_canonizeURL.js | entering 'ftp.example.bar' loads expected URL - Got http://ftp.example.bar/, expected ftp://ftp.example.bar/
527 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_plainTextLinks.js | ftp.example.com should be preceeded with ftp:// - Got http://ftp.example.com/, expected ftp://ftp.example.com/
665 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_urlHighlight.js | Correct part of the urlbar contents is highlighted - Got <ftp.>mozilla.org, expected <http://ftp.>mozilla.org
865 INFO TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_urlbarTrimURLs.js | url bar value set - Got ftp.mozilla.org, expected http://ftp.mozilla.org
jeremy can you get access to try and work out the tests that need to be updated?
I'll accept the patch concept.
Comment 7•10 years ago
|
||
Comment on attachment 8621755 [details] [diff] [review]
bug-1174254.patch
Review of attachment 8621755 [details] [diff] [review]:
-----------------------------------------------------------------
tests need updating
Attachment #8621755 -
Flags: review?(mcmanus) → review-
Comment 8•10 years ago
|
||
I think we should make this change:
* HTTP can show nicer UI.
* HTTP can redirect to HTTPS (and use HSTS).
* The FTP protocol on ftp.mozilla.org is being turned off soon (August 15).
Doug, please file a new bug for removing FTP support. That needs broader discussion and data.
Flags: needinfo?(dougt)
Reporter | ||
Comment 10•10 years ago
|
||
(In reply to Patrick McManus [:mcmanus] from comment #6)
> 409 INFO TEST-UNEXPECTED-FAIL |
> browser/base/content/test/general/browser_canonizeURL.js | entering
> 'ftp.example.bar' loads expected URL - Got http://ftp.example.bar/, expected
> ftp://ftp.example.bar/
> 527 INFO TEST-UNEXPECTED-FAIL |
> browser/base/content/test/general/browser_plainTextLinks.js |
> ftp.example.com should be preceeded with ftp:// - Got
> http://ftp.example.com/, expected ftp://ftp.example.com/
> 665 INFO TEST-UNEXPECTED-FAIL |
> browser/base/content/test/general/browser_urlHighlight.js | Correct part of
> the urlbar contents is highlighted - Got <ftp.>mozilla.org, expected
> <http://ftp.>mozilla.org
> 865 INFO TEST-UNEXPECTED-FAIL |
> browser/base/content/test/general/browser_urlbarTrimURLs.js | url bar value
> set - Got ftp.mozilla.org, expected http://ftp.mozilla.org
The first two failures make sense. Any idea why this would affect highlighting and trimming?
Flags: needinfo?(oremj) → needinfo?(mcmanus)
Comment 11•10 years ago
|
||
no.. you probably need to find someone on the frontend team for the insight
Flags: needinfo?(mcmanus)
Reporter | ||
Comment 12•9 years ago
|
||
This should fix up the broken tests. I looked in to this further. They were breaking, because trimURL trims off http://, unless the "fixed up" URL is different from the given URL. Before this patch http://ftp.mozilla.org, would test "http://ftp.mozilla.org" == "ftp://ftp.mozilla.org" and fail, so it would not strip http://.
Relevant code in browser/base/content/utilityOverlay.js:trimURL
> try {
> fixedUpURL = Services.uriFixup.createFixupURI(urlWithoutProtocol, flags);
> expectedURLSpec = makeURI(aURL).spec;
> } catch (ex) {
> return url;
> }
> if (fixedUpURL.spec == expectedURLSpec) {
> return urlWithoutProtocol;
> }
> return url;
Attachment #8621755 -
Attachment is obsolete: true
Attachment #8746874 -
Flags: review?(mcmanus)
Comment 13•9 years ago
|
||
Comment on attachment 8746874 [details] [diff] [review]
bug-1174254.patch
Review of attachment 8746874 [details] [diff] [review]:
-----------------------------------------------------------------
I've pushed this to try for you - please don't checkin unless that passes.
Attachment #8746874 -
Flags: review?(mcmanus) → review+
Comment 14•9 years ago
|
||
Reporter | ||
Comment 15•9 years ago
|
||
Looks like the tests passed, what's the next step?
Flags: needinfo?(mcmanus)
Comment 16•9 years ago
|
||
Flags: needinfo?(mcmanus)
Comment 17•9 years ago
|
||
Specifically, see the use of the checkin-needed keyword described in "Committing the patch".
Reporter | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 18•9 years ago
|
||
Keywords: checkin-needed
Comment 19•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment 21•9 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #20)
> Is this worth relnoting?
Sure, please nominated for relnote and craft some verbiage and we can include it in the changed section.
Flags: needinfo?(mozillamarcia.knous) → needinfo?(overholt)
Comment 22•9 years ago
|
||
(Sorry I'm late here. On second thought, it's probably not worth rel-noting this.)
Flags: needinfo?(overholt)
You need to log in
before you can comment on or make changes to this bug.
Description
•