channel names for irc: urls containing '/' are incorrectly escaped

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: glenjamin+bmo, Assigned: rginda)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.83])

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
Build Identifier: ChatZilla 0.9.82 [Firefox 2.0.0.14/2008040413]

Forward slashes in channel names are escaped twice.

I had a look at the code, its because slashes are manually escaped *before* ecmaEscape is run on the channel string.

The fix is pretty simple, i'd attach a patch but i dont currently have the environment to create one:

(irc.js:3730)
url += ecmaEscape(obj.target.replace(/\//g, "%2f"));

needs to be changed to

(irc.js:3730)
url += ecmaEscape(obj.target).replace(/\//g, "%2f");


Reproducible: Always

Updated

11 years ago
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
(Reporter)

Comment 1

11 years ago
Created attachment 322404 [details] [diff] [review]
its a patch.
Attachment #322404 - Flags: review?

Comment 2

11 years ago
Comment on attachment 322404 [details] [diff] [review]
its a patch.

Doh. r=me.
Attachment #322404 - Flags: review? → review+

Comment 3

11 years ago
Checking in mozilla/extensions/irc/js/lib/irc.js;
/cvsroot/mozilla/extensions/irc/js/lib/irc.js,v  <--  irc.js
new revision: 1.123; previous revision: 1.122
done
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.83]
You need to log in before you can comment on or make changes to this bug.