User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:184.108.40.206) Gecko/20060909 Firefox/220.127.116.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20060909 Firefox/22.214.171.124 - Reproducible: Always Steps to Reproduce: 1. Open irc://quakenet/TC:Elite. 2. Enable "Open this channel at startup" for that channel. 3. Quit and restart Chatzilla. Actual Results: Error message box: Invalid IRC URL "irc://quakenet/TC%3aElite".
Forgot to mention it was Chatzilla 0.9.75.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Autojoin on startup doesn't work for channels with URL-encoded characters → parseIRCURL doesn't like colons
Per the IRC spec itself, colons are not valid in channel names. The URL is, therefore, invalid (in that it points at an invalid resource). We explicitly disallow ^G (0x07), ",", ":" and whitespace within the resource target of the URL because all are invalid per the IRC spec. We should really disallow issuing a JOIN for such an invalid channel in the first place.
How else would we allow connecting to channels with masks? <irc://moznet/chatzilla%3a*.mozilla.org> is a valid channel reference, and since it creates a different channel to #chatzilla, it makes sense for a client to treat the mask part as opaque.
Channel masks are not compatible with existing server implementations, as demonstrated by the reporter being in a channel with a colon in the name. They are also not specified in the original IRC spec and completely under-specified in the new IRC specs (2811 in particular). I don't wish to pretend to support them.
So if we don't want to 'support' masks, that means we should either allow the : normally, so that people like the reporter can still use their channels even in URLs, or we can disallow it in joins too, effectively shutting people out of part of the IRC server, or we can mark this wontfix and keep the status quo. I suppose the decision is with the owner/peers - Rob, Samuel, James, what do you think? Personally, I feel we should allow it in the URL as well, as disallowing it in joins will shut people out, and the status quo is inconsistent and means we actually *generate* invalid URLs ourselves.
#TC:Elite gets parsed as a valid link in mIRC, and automatic joining of that channel at startup also works. Might be a good idea to follow mIRC, since it's probably the most popular client. And if it doesn't break anything, why not?
I guess we could allow this and let the server complain when it doesn't support it.
We should ultimately allow : in the channel name, both to allow masks on servers that support it (like Unreal) and the technically invalid names found on Quakenet. We also need to pick up this error code when attepting to join a channel on a server that supports masks, but with an invalid mask:  #foo:bar Bad Channel Mask
Created attachment 262864 [details] [diff] [review] Tested Patch Sometimes things are surprisingly easy. Let's fix this. I'm open to suggestions on the message, by the way, though I'm quite happy with the current text, perhaps there are better ways of putting it.
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #262864 - Flags: review?(silver)
Checking in mozilla/extensions/irc/xul/content/static.js; /cvsroot/mozilla/extensions/irc/xul/content/static.js,v <-- static.js new revision: 1.241; previous revision: 1.240 done Checking in mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties; /cvsroot/mozilla/extensions/irc/xul/locale/en-US/chatzilla.properties,v <-- chatzilla.properties new revision: 1.135; previous revision: 1.134 done
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.