Closed Bug 31335 Opened 25 years ago Closed 22 years ago

Domain Guessing: localhost links switches to www.localhost.com

Categories

(Core :: DOM: Navigation, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED DUPLICATE of bug 34943

People

(Reporter: inan, Assigned: gagan)

References

()

Details

(Keywords: verifyme)

In trying to be helpful, Mozilla is VERY frustrating in this department. When accessing local files with just localhost/something.html, Mozilla adds www. and .com. Please do something - maybe work it like lynx does, check the actual address entered, then if there is no response then start trying .com, .net, .org's. (BTW, I'm using M14, not M13 as reported)
updating component and owner
Assignee: cbegle → gagan
Component: Browser-General → Networking
QA Contact: asadotzler → tever
This may have been fixed. It doesn't autoexpand localhost to www.localhost.com for me on Linux build 2000.03.09.13. I don't have a server running though, so it just silently fails, but I think there's a bug on that. inan, could you try this with a recent nightly build. If it's still broken, I'll confirm it.
I tried it out with 2000-03-06-13 and it is behaving the same way, though I realized that it is a bit more complicated than I first thought. It seems to work properly (not redirect to www.localhost.com) if the page does not link to a CSS page. I'll keep poking and see if I can narrow it down some more.
Ok, I've got even a bit more now. When I took the @import statement from the CSS page I was linking to the problem seems to have gone away, as well as one that seems may be related - before it was also dropping the page's style if you hit refresh.
I think the stylesheet stuff is unrelated. There's a bug on linked JS and CSS being ignored when the document is reloaded. A cache issue. Caching was turned off for CSS and JS in yesterday's builds; should temporaryly take care of the problem (see bug 29370). It's really weird that the URL would autoexpand to www.localhost.com depending on the content of the document.
cc'ing valeski
inan@canada.com - are you still seeing this problem with recent builds of Mozilla? Gerv
Marking WORKSFORME in 20000514. Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
marking verified. tested on linux 2000092810 MN6 comm bits. localhost loads my local web server now.
Status: RESOLVED → VERIFIED
This appears to be a pretty nasty security bug too. I forgot to restart apache, and as a result, some pages were silently lifted from my cache (using http://localhost:8080/ as home URL). It happily accessed links from the page it displayed (login screen), and sent my (database administrator) login and password to www.localhost.com over the net! I don't know how trustworthy the folks at localhost.com are, but you bet I changed the db admin login and password!
REOPEN: This wasn't ever Necko's fault.
Component: Networking → Embedding: Docshell
I remember where this goes now... Mike, are you saying that that URL is your home page, and you auto-loaded to www.localhost.com because your server was off? You should create a new bug under home pages (don't know which component that is), and explain this is a security problem. Links and several other entry points used to auto-fire domain guessing. Later it was isolated to just URL bar. Home page might simply call URL bar, causing this to happen because you had a connection error. I don't know how to solve this. You can look for more information about how this works in: http://www.mozilla.org/docs/end-user/domain-guessing.html You can also turn this feature off now in prefs.
Status: VERIFIED → UNCONFIRMED
QA Contact: tever → claudius
Resolution: WORKSFORME → ---
Summary: localhost switches to www.localhost.com → Domain Guessing: localhost links switches to www.localhost.com
*** This bug has been marked as a duplicate of 34943 ***
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago22 years ago
Resolution: --- → DUPLICATE
Keywords: verifyme
verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.