Potential origin spoofing because address bar truncates or elides parts of the domain (e.g. "facebook.com.evil.com" to "facebook.com..." instead of "...evil.com")
Categories
(Firefox :: Address Bar, defect, P2)
Tracking
()
People
(Reporter: cpeterson, Assigned: daisuke)
References
()
Details
(Keywords: blocked-ux, csectype-spoof, sec-moderate, Whiteboard: [sng-scrubbed])
Attachments
(1 file)
When the browser window is narrow, Firefox's address bar truncates "http://facebook.com.evil.com/" to look like "facebook.com..." instead of "...evil.com".
Chrome, Safari, Edge, and IE11 all have this same address bar behavior:
| Reporter | ||
Comment 1•6 years ago
|
||
The URL standard says:
When the full host cannot be rendered, browsers should elide domain labels starting from the lowest-level domain label. For example,
examplecorp.com.evil.comshould be elided as...com.evil.com, notexamplecorp.com....
Comment 2•6 years ago
|
||
it's interesting that there's a standard on how to elide URLs, and you point out this affects every browser, so it must not be well known.
It may not be trivial to address this without breaking some things like drag-selecting a part of the url and avoiding too much url jumping-around on focus.
Bug 1598563 here could help a little bit, by making the urlbar be one of the last things shrinking. But obviously one could build a long enough sub domain to push things out of the view.
I also wonder if we could improve the tooltip when the url overflow, we currently show the full url, we could make it multi-line and show the origin too, or we could deemphasise the tooltip to make the origin more visible. It would only be visible when hovering it with the mouse though.
It sounds like this is an interesting problem, requiring also some UX evaluation.
| Reporter | ||
Comment 3•6 years ago
|
||
I tested Fennec, Fenix, and Chrome on Android. Fennec and Chrome do the right thing (showing ...ook.com.facebook.com.evil.com and facebook.com.evil.com respectively), but Fenix does not (http://facebook.com.facebook...). I filed a new Fenix UI bug:
Updated•6 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 10•3 years ago
|
||
We should add a test that covers the case illustrated by Daniel's example above.
We need some discussion with UX to elide the URL and see if the standard works well on the tested platform.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 13•1 year ago
•
|
||
There's also RTL issues involved here. The problem is the visual representation of a bidi string may move the domain around depending on the presence of one or multiple strong directionality characters.
We have some code trying to predict the position of the domain (start or end), but it's not good enough, bidi rules are more complex (may indeed also end up in the middle).
To solve both problems we may try to use a SELECTION for the domain (pretty much inverting the current situation where we select all the rest to de-emphasize) and use/fix scrollSelectionIntoView of the editor to ensure it is visible.
We could also move the cursor position to the start of the domain, though currently some code (e.g. switching to a tab that had autofill in the urlbar) depends on us preserving the cursor position on blur.
Updated•1 year ago
|
| Assignee | ||
Updated•7 months ago
|
Comment 20•7 months ago
•
|
||
note there is a patch improving this in Bug 1986161 (it just needs a fix for a rounding mistake, and maybe a followup to make the dissolving gradient smaller and more subtle so characters remain readable), before we move on here I'd like to know what's the plan of action.
| Assignee | ||
Comment 21•7 months ago
•
|
||
Oh, I see. Thank you for the information, Marco!
Since I have almost finished writing the patch, I will attach the patch later. I am glad if my patch will help bug 1986161.
(And I will clear this assignee later, after pushing my patch).
| Assignee | ||
Comment 22•7 months ago
|
||
This is the patch. https://phabricator.services.mozilla.com/D278419
| Assignee | ||
Comment 23•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Comment 24•5 months ago
|
||
Hi Marco!
How is bug 1986161?? If the bug can continue, I will unassign myself again from this.
Comment 25•5 months ago
|
||
(In reply to Daisuke Akatsuka (:daisuke) from comment #24)
Hi Marco!
How is bug 1986161?? If the bug can continue, I will unassign myself again from this.
if you have time to update the patch there (while maintaining the original author) to not fail the test, please do and land it. I think it's just a rounding issue. After that lands you can re-evaluate if there's parts of this still useful to land on top.
| Assignee | ||
Comment 26•5 months ago
|
||
Hi! I will take a look at bug 1986161.
Comment 27•2 months ago
|
||
Bug 1986161 landed, and afaict it fixed the most common cases, still TBD if it addressed all the edge cases with RTL (I couldn't find a broken case so far).
Description
•