Closed Bug 1672509 Opened 6 months ago Closed 5 months ago

Simple keyword searches are treated as potential domain visits

Categories

(Firefox :: Address Bar, defect, P2)

Firefox 83
defect
Points:
2

Tracking

()

VERIFIED FIXED
84 Branch
Iteration:
84.2 - Nov 2 - Nov 15
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 --- verified
firefox84 --- verified

People

(Reporter: lucas.werkmeister, Assigned: mak)

References

Details

Attachments

(1 file)

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

Steps to reproduce:

Enter w something into the awesome bar, where w is a search shortcut for Wikipedia.

Actual results:

Firefox asks:

Did you mean to go to http://something/? [Yes, take me to http://something/] [No thanks]

Expected results:

Since I did not enter something as the address, but w something, Firefox should not suggest to treat the search term as a search keyword.

This is even more irritating for non-ASCII searches: if I search for „rückwärts“, Firefox asks if I wanted to go to http://xn--rckwrts-8wa6s/, which would look like incomprehensible gibberish if I didn’t happen to know what punycode is.

This seems to be caused by the same new awesome bar / search keyword behavior that also caused 1672507 (I’m pretty sure I would’ve noticed this if it already happened in v81).

Version: Firefox 82 → Firefox 83

This seems to be caused by the same new awesome bar / search keyword behavior that also caused 1672507 (I’m pretty sure I would’ve noticed this if it already happened in v81).

Sorry, I mixed up my versions – I’m on v83 now, so I believe it did not yet happen in v82. (And I assume bug 1672507 didn’t get linked because I forgot the word “bug”?)

I can't reproduce this issue on the latest Nightly 84.oa1 on Ubuntu 20.04 x64 I'm not seeing any "Did you mean to go to http://something/? [Yes, take me to http://something/] [No thanks]" question when entering w something in the URL bar.

Lucas, please can you confirm whether you reproduce this issue using Firefox in safe mode or with a new profile?
http://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode
http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

Thanks!

Component: Untriaged → Address Bar
Flags: needinfo?(lucas.werkmeister)

It should not happen as far as you type "w something", it can happen for "something" if either a local service, the router or your provider DNS, are hijacking single words, transforming them into valid domains.

If you go to http://something/, what do you see?

Duplicate of this bug: 1673283

Ok, considered the duplicate bug I suspect this is what happens:

  1. the user has some service, router, provider that is resolving any words through the DNS to provide the "courtesy page".
  2. Due to Bug 1333191 this situation would normally happen when typing a single word
  3. With search mode "keyword someword" becomes [engine] "someword" and we wrongly consider it a single word, so it goes through the usual process for single words that ends up hitting Bug 1333191

There are 2 workarounds for users:

  1. Figure out what is causing this behavior, by visiting a random page like http://somerandomthing, if it's the Internet Provider, they should provide some Settings link on that page that allows the user to opt-out of the DNS wildcard service
  2. Open about:config, search for browser.urlbar.dnsResolveSingleWordsAfterSearch and set it to 0, that will disable our "did you mean to go to" prompt, while not resolving the fact something is answering DNS requests with made-up data.
Assignee: nobody → mak
Severity: -- → S3
Status: UNCONFIRMED → NEW
Iteration: --- → 84.2 - Nov 2 - Nov 15
Points: --- → 2
Ever confirmed: true
Flags: needinfo?(lucas.werkmeister)
Priority: -- → P2

If I go to http://something/, I see the same page as on https://code.wpia.club/, probably because that page is hosted on my server (lucaswerkmeister.de, and presumably the default Apache site if the Host: header doesn’t match any other configured site) and my local hostname is set to someothername.lucaswerkmeister.de. I guess there’s something slightly wrong with my local hostname/resolution setup, but so far I haven’t felt the need to fix it. (I see the same code.wpia.club for any domain name that doesn’t exist, whether it has one or more components.)

To clarify: I’ve always gotten the “did you mean to go to http://something” message when typing single words into the address bar (i. e., using the default search engine) – that part isn’t new, but I always assumed that was a more-or-less intended feature because something on my system could be resolving such hostnames. (It didn’t occur to me that Firefox would only offer this option because something on my system does resolve such hostnames, and it’s related to the code.wpia.club issue.) But even if http://something/ exists on my system (which, sure, isn’t Firefox’ fault ☺), I wouldn’t expect it to be suggested after keyword searches.

(And to answer the question from bug 1672507 here as well – by “search keyword” / “keyword search”, I mean the kind that you configure in about:preferences#search, not bookmark keywords.)

Comment on attachment 9186963 [details]
Bug 1672509 - Simple keyword searches are treated as potential domain visits. r=harry

Beta/Release Uplift Approval Request

  • User impact if declined: Users with wildcard DNS servers, that normally see the "did you mean to go to" prompt when confirming single words in the urlbar, will now also hit that problem in Search Mode, when typing a keyword followed by a single word. Search Mode is one of the features we're launching in 83, thus it would be nice to avoid this annoyance.

If it's not possible to land in late 83, we'd consider riding along a dot release

  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. open about:config, switch browser.fixup.domainwhitelist.localhost to false
  1. type in the urlbar a search engine keyword followed by localhost, for example @wikipedia localhost
  2. Search Mode should be inited showing [Wikipedia] localhost
  3. Confirm the search
  4. Ensure we don't show the Did you mean to go to "http://localhost" prompt
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): it's a oneliner with a test, making an if condition more strict
  • String changes made/needed:
Attachment #9186963 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/14a847069fb2
Simple keyword searches are treated as potential domain visits. r=harry
Attachment #9186963 - Flags: approval-mozilla-beta? → approval-mozilla-release?
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
QA Whiteboard: [qa-triaged]

Comment on attachment 9186963 [details]
Bug 1672509 - Simple keyword searches are treated as potential domain visits. r=harry

This is a visible bug in our main UI, I think that together with bug 1672509, it gives enough reasons to have a RC2.

Attachment #9186963 - Flags: approval-mozilla-release? → approval-mozilla-release+

Reproduced the regressing behaviour on 84.0a1 2020-11-02 on windows10 64bit and verified the fix on 84.0a1 2020-11-12 using Windows 10, Ubuntu 20.04 and Mac 10.15

steps:

  • open about:config, switch browser.fixup.domainwhitelist.localhost to false
  • type in the urlbar a search engine keyword followed by localhost, for example @wikipedia localhost
  • Search Mode should be inited showing [Wikipedia] localhost
  • Confirm the search
  • Ensure we don't show the Did you mean to go to "http://localhost" prompt

Verified the fix on Firefox 83.0 RC2 using Windows 10, Ubuntu 20.04 and Mac 10.15

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.