Closed Bug 1831364 Opened 2 years ago Closed 2 years ago

Typing a URL in address bar will result in a search for the URL if it contains a \u200b character

Categories

(Firefox :: Address Bar, enhancement)

Firefox 112
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: cecilialopes, Unassigned)

Details

Attachments

(3 files)

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

Steps to reproduce:

When copying an URL from a PDF file and trying to insert it in the address bar of firefox, it invariably made a search for the URL instead of accessing it. When I pasted the URL in notepadqq, I found a \u200b (zero width space) character after "https" and before ":". This made the browser interpret the address as a search query instead of an URL.

Since no user is ever going to type a \u200b character as part of a search, ideally firefox should strip this character off the query before checking if it's an URL.

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

Component: Untriaged → Address Bar

Hello, thank you for the bug report!
Unfortunately I could not reproduce your issue. Would you be so kind as to answer a few questions so we can investigate this further?

Thank you.

Flags: needinfo?(cecilialopes)

The offending PDF file. Most of the URLs in the references section contain \u200b characters between "https" and ":\"

Attached file example url.txt

Text file with a single URL which, when pasted on the address bar, displays the behavior described.

I've tried it in a new profile, in nightly, and in troubleshoot mode. Same behavior in all of them.

Flags: needinfo?(cecilialopes)

FWIW, some more notes:

  • Using the link in the text file I attached here, I got the same behavior on Firefox 112 on both android and windows 11.
  • It appears that my PDF software is responsible for adding the \u200b characters in the url. It doesn't happen when I copy the URL from the PDF file when the PDF file is opened directly on Firefox. And when I open it on Acrobat 11, the copied URL had regular spaces (\u0020) where the \u200b would otherwise appear.
  • Nevertheless, you should be able to reproduce the behavior I described using the contents of the text file I attached.

Thank you for the attachment, Cecilia!
Reproducible on macOS 12, Windows 10, Ubuntu 22 on:

  • Firefox 113.0;
  • Firefox 114.0b1;
  • Nightly 115.0a1;

Setting as NEW so the developers can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true

We won't fix this for a few reasons:

  1. we don't want to "hide" problems. You figured there was a problem in the url by that copy/paste, imagine an author that thinks everything is working after testing the url, but we secretly fixed it. They won't notice a problem.
  2. we are consistent with other browsers (at least chromium based ones), While this in itself is not a sufficient justification, along with point 1. it means the author tests their whitepaper in Firefox, everything works, but then it's still broken in other browsers
  3. The example pdf works for me, that means the zero-width space was probably added by your Linux pdf reader... Again it's better to notice and report that as a bug to the pdf reader authors
  4. By removing the zero-width space we're pretty much transforming the protocol. While I can't think of stron concerns as of now, we should evaluat potential security concerns with doing that
  5. maybe a url could have been de-linkified by choice (imagine a whitepaper linking to malware sites as examples) and we probably don't want to make it easier to access them
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: