Closed Bug 1864939 Opened 1 year ago Closed 1 year ago

URL parsing of ssh:// adds a trailing slash to the href

Categories

(Core :: Networking, defect)

Firefox 110
defect

Tracking

()

RESOLVED DUPLICATE of bug 1326394

People

(Reporter: jpgesquerdo, Unassigned)

Details

Attachments

(1 file)

Attached image firefox-bug.png

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

In a dumb page with a link to a new protocol like ssh://10.10.23.136
Firefox detects it correctly and offers me an SSH application.
Application is receiving to open 10.10.23.136/

Actual results:

Application is receiving to open 10.10.23.136/
an the SSH application can not resolve 10.10.23.136/

Expected results:

The application must receive exactly the same content as that encoded in the HTML. No extra characters

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → DOM: Core & HTML
Summary: Bug adding false slash at the end of a host → URL Link - adding false slash at the end of a host

Gijs, is this likely to be an external protocol handler issue? That's kind of what it feels like to me. Thanks.

Flags: needinfo?(gijskruitbosch+bugs)

(In reply to Andrew McCreight [:mccr8] from comment #2)

Gijs, is this likely to be an external protocol handler issue? That's kind of what it feels like to me. Thanks.

No, this is a DOM issue, because:

new URL("ssh://12.12.12.12").href

has the trailing slash. Valentin would know why; I would have assumed a spec requirement, but testing in chrome it does not get the trailing slash. Anyway, by the time the external protocol handler sees it, there's no way to find the original attribute value (different process etc.).

Flags: needinfo?(gijskruitbosch+bugs) → needinfo?(moz.valentin)
Summary: URL Link - adding false slash at the end of a host → Opening an external (non-http/https) HTML <a href> link - adds an unwanted trailing slash after hostname

Thanks. I think we put URL parsing in Networking now so I'll move it there.

It looks like Chrome DOES add the trailing slash for https://, http:// and ftp:// but does NOT for other miscellaneous protocols like blob://, gopher:// and gijs://.

Status: UNCONFIRMED → NEW
Component: DOM: Core & HTML → Networking
Ever confirmed: true

Firefox DOES add the trailing slash for https://, but does NOT for blob://, gopher:// and gijs://. So in my limited testing it is only ssh:// where we disagree.

Summary: Opening an external (non-http/https) HTML <a href> link - adds an unwanted trailing slash after hostname → URL parsing of ssh:// adds a trailing slash to the href

Duplicate of bug 1326394.
Will be fixed by bug 1603699.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1326394
Flags: needinfo?(moz.valentin)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: