Server's hostname matching another network's name is bad for hostname->network conversion

RESOLVED FIXED

Status

Other Applications
ChatZilla
--
trivial
RESOLVED FIXED
9 years ago
7 years ago

People

(Reporter: tonymec, Assigned: James Ross)

Tracking

({regression})

Trunk
regression

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.86.1], URL)

Attachments

(2 attachments)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7pre) Gecko/20091219 Lightning/1.0b2pre SeaMonkey/2.0.2pre - Build ID: 20091219000617

cZ 0.9.86 installed in the current profile

The following works:
ChatZilla => Preferences => Global Settings => Startup => Auto-connect URLs => ircs://irc.mozilla.org:6697/

It connects to a server which it names "moznet" but when doing a /whois on myself (tonymec) I see among others the line:
=== tonymec is using a Secure Connection

Neither of the following works, in a running but not yet connected chatZilla (and I checked that my DSL interface is connected):
/attach ircs://irc.mozilla.org:6697/
/sslserver irc.mozilla.org 6697

They both fail with the message
[ERROR] Unknown host ``moznet'' connecting to ircs://moznet:6697/ (ircs://moznet:6697/). [[Help][Get more information about this error online][faq connection.unknown.host]] Reconnecting in 15 seconds. [[Cancel]

I believe that in these two cases, cZ "translates" irc.mozilla.org to moznet before passing the result to the DNS server -- which of course has no knowledge of "moznet" as a domain name.

This did not happen in cZ 0.9.85, because it didn't know that irc.mozilla.org and moznet were "the same".
P.S. I believe this bug was created as a side-effect of an imperfect fix for bug 475387.
(Assignee)

Comment 2

9 years ago
Have you checked for any plugins that might be changing the moznet configuration, networks.txt redefining it or any aliases for the /attach and /sslserver commands?

ChatZilla 0.9.86 [Firefox 3.5.5/20091102152451] has no trouble with either of the commands for me (starting it fresh each time, with no plugins, networks.txt or auto-connect URLs).
Created attachment 418532 [details]
log of failed connection attempts (times are in CET = UTC+0100)
In reply to comment #2
The only installed script is one that warns of CTCP requests from outside.

One possible factor is that before attempting those failed attempts mentioned above, I tried (not sure which) /attach or /sslserver with moznet:6697. Thereafter, until I /quit Chatzilla, it was impossible to connect to ircs://irc.mozilla.org:6697/ -- then I /quit to see if auto-connect would still work, and it did.
(Assignee)

Comment 5

9 years ago
Doing either /attach or /sslserver with moznet:6697 will create a network called "moznet:6697", with host "moznet" and port "6697".

One of the optimisations in the code in bug 475387 relies on there never being a network name which is also the hostname of a server in another network - which is, unfortunately, exactly the situation you managed to create with the invalid /attach or /sslserver command.
(Assignee)

Updated

9 years ago
Severity: normal → trivial
OS: Linux → All
Hardware: x86 → All
Well, even after removing the entry for moznet:6697 in the Preferences, I still could not connect to irc.mozilla.org:6697 (not even by writing "ircs://irc.mozilla.org:6697/" in the browser's URL bar) until /quit.

You think this bug is INVALID then?
(Assignee)

Comment 7

9 years ago
Created attachment 418533 [details] [diff] [review]
Always jump out of outer loop when we've found it
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attachment #418533 - Flags: review?(gijskruitbosch+bugs)
(Assignee)

Comment 8

9 years ago
(In reply to comment #6)
Preferences has NOTHING WHATSOEVER TO DO WITH ANYTHING.
(Assignee)

Updated

9 years ago
Summary: Cannot use irc-over-ssl on a known network, except as implicit Chatzilla startup command → Server's hostname matching another network's name is bad for hostname->network conversion
It seems to me that it could be the port that is causing this...

Comment 10

9 years ago
Comment on attachment 418533 [details] [diff] [review]
Always jump out of outer loop when we've found it

r=me , makes sense. I guess this is enough of a weird case to maybe not make a comment worth it, although it did take me a long while to figure out why this code fixes stuff (also to do with the bizarreness of the issue described). Your choice of adding a comment or not.
Attachment #418533 - Flags: review?(gijskruitbosch+bugs) → review+
(Assignee)

Comment 11

9 years ago
Pushed with no comment --> FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.87]
(Assignee)

Updated

7 years ago
Whiteboard: [cz-0.9.87] → [cz-0.9.86.1]
You need to log in before you can comment on or make changes to this bug.