JonasNo / fauxbar

Automatically exported from code.google.com/p/fauxbar
0 stars 0 forks source link

Detect intranet/localhost domains (workaround=allow for not escaping search terms in "Fallback URL") #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. In Firefox or Chrome Omnibox, type "abc/def".  "abc" is an intranet domain 
at my company (say, "abc.intranet.my_company_domain.com") so Firefox knows to 
go there directly.  However Fauxbar falls back to an I'm feeling lucky result.

What is the expected output? What do you see instead?

I would love to have Fauxbar detect intranet domains (like Firefox seems to 
do).  However a great workaround would be to allow a way to have a "fallback 
URL" which doesn't escape search terms.  That way, I can "fall back" to 
http://{searchTerms} and have that redirect to http://abc/def (which Chrome 
seems to find), instead of http://abc%2Fdef.  Maybe by putting in 
{searchTerms|unescape} or something?

What version of the product are you using? On what operating system?

Fauxbar 1.1.2 on Chrome on Windows 7.

Please provide any additional information below.

Fauxbar is really great thanks so much for making this extension, after reading 
http://www.google.com/support/forum/p/Chrome/thread?tid=6501481bab1c67eb&hl=en 
and http://code.google.com/p/chromium/issues/detail?id=91378 I was starting to 
lose hope :)

Original issue reported on code.google.com by papillon...@gmail.com on 1 Nov 2011 at 7:52

GoogleCodeExporter commented 9 years ago
Thanks for reporting this.

Before defaulting to the Fallback URL, I'll make Fauxbar perform an Ajax GET 
command to see if the Address Box's input is a valid URL.

So, if you type in "abc/def", Fauxbar will still assume it's not a valid URL at 
first glance. But I'll have Fauxbar then attempt to retrieve "http://abc/def", 
and if that comes back as OK, Fauxbar will send you to "http://abc/def" as 
desired.

For testing, I'll make 'abc' resolve to 127.0.0.1 in my local hosts file. I 
think this should work.

And you're welcome :D

Original comment by fauxbar....@gmail.com on 1 Nov 2011 at 8:43

GoogleCodeExporter commented 9 years ago
This has been fixed in v1.2.0 (just released).

Made this check for custom domain names (that don't contain periods) in 2 steps:

1. Before using the Fallback URL, Fauxbar queries its database to see if any 
page uses the supposed domain name. If a result is returned, it's deemed as 
valid, and Fauxbar will take you to your desired page by putting "http://" in 
front of your input.

2. If no database results return, Fauxbar performs an Ajax GET request for the 
domain's homepage. eg, if you type in "abc/def", Fauxbar attempts to retrieve 
"http://abc/". If this top-level page returns successfully, even if it's a 404 
or 403 error or whatever, it means the domain at least exists, and your input 
is deemed valid.

Failing these two checks, the Fallback URL will be used.

Original comment by fauxbar....@gmail.com on 12 Nov 2011 at 3:58