Bug 1642623 Comment 8 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Valentin Gosu [:valentin] (he/him) from comment #7)
> So my questions are:
> 1. What characteristics does a non-default /etc/hosts have, vs a default one?
> 2. What do we intend to do differently when that happens?

It's a tricky question. First, fixup recognizes most hosts that end in .local, .internal and other well defined suffixes, in those cases we'd have no problem here because we know those hosts are valid.
The problem is string with totally unknow suffixes (not in the PSL and not in the fixup lists) and non-dotted strings. Anything that URIFixup thinks it may be a search.
I'd assume a good initial heuristic may be "/etc/hosts only contains 'localhost'".

We'd like to use that info to create an heuristic that avoids sending a string to the DNS when the user is unlikely to be using an intranet.
What we do right now, when a host is not recognized by URIFixup is: execute a search, then fire a DNS request to eventually show a "Did you mean to go to http://site/?" prompt.
We could avoid the DNS lookup if we knew the user is unlikely to be using intranet hosts.

So for example it is unlikely a word may be an intranet address if:
- user is using DOH
- /etc/hosts only contains localhost
- no policies are in use
- the computer is not enrolled in a domain
(In reply to Valentin Gosu [:valentin] (he/him) from comment #7)
> So my questions are:
> 1. What characteristics does a non-default /etc/hosts have, vs a default one?
> 2. What do we intend to do differently when that happens?

It's a tricky question. First, fixup recognizes most hosts that end in .local, .internal and other well defined suffixes, in those cases we'd have no problem here because we know those hosts are valid.
The problem is string with totally unknow suffixes (not in the PSL and not in the fixup lists) and non-dotted strings. Anything that URIFixup thinks it may be a search.
I'd assume a good initial heuristic may be "/etc/hosts only contains 'localhost'".

We'd like to use that info to create an heuristic that avoids sending a string to the DNS when the user is unlikely to be using an intranet.
What we do right now, when a host is not recognized by URIFixup is: execute a search, then fire a DNS request to eventually show a "Did you mean to go to http://site/?" prompt.
We could avoid the DNS lookup if we knew the user is unlikely to be using intranet hosts.

So for example a word is unlikely an intranet host if:
- user is using DOH
- /etc/hosts only contains localhost
- no policies are in use
- the computer is not enrolled in a domain

Back to Bug 1642623 Comment 8