Closed
Bug 437184
Opened 18 years ago
Closed 18 years ago
Inline CTCP causes messages to get lost
Categories
(Other Applications Graveyard :: ChatZilla, defect)
Other Applications Graveyard
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: SmoothPorcupine, Assigned: glenjamin+bmo)
Details
(Whiteboard: [cz-0.9.83])
Attachments
(2 files, 3 obsolete files)
|
793 bytes,
image/gif
|
Details | |
|
1.26 KB,
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9
Build Identifier: 0.9.82.1
When a message is sent to you or a channel you are in through either PRIVMSG or NOTICE, it is checked for CTCP with this regular expression:
/\x01.*\x01/i
If this regular expression then fails to match, it silently fails:
/^\x01([^ ]+) ?(.*)\x01$/i
No errors, NOTICE's, PRIVMSG's, or any other type of message is displayed.
Reproducible: Always
Steps to Reproduce:
1. Receive a specially crafted message.
Actual Results:
Nothing at all.
Expected Results:
Completely awesome inline messages, see attachment.
(Or at least show something.)
| Reporter | ||
Comment 1•18 years ago
|
||
| Assignee | ||
Comment 2•18 years ago
|
||
I see what you mean now, couldn't understand a word you were trying to say in the channel the other night.
I believe the fix here is to change /\x01.*\x01/ to /^\x01.*\x01$/ (I cant see why case-insensitive is necessary)
irc.js; CIRCServer.prototype.onPrivmsg
http://mxr.mozilla.org/mozilla/source/extensions/irc/js/lib/irc.js#2434
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 3•18 years ago
|
||
Assignee: rginda → glenjamin+bmo
Status: NEW → ASSIGNED
Attachment #323737 -
Flags: review?(gijskruitbosch+bugs)
Comment 4•18 years ago
|
||
Comment on attachment 323737 [details] [diff] [review]
flag only real CTCP messages as such
Actually, looking at it myself, I think you should use:
/^\x01[^ ]+.*\x01$/
Unless we want to assume that IRC servers don't send on stuff that starts \x01<space>
I don't really like making assumptions about IRC servers too much. :-(
Attachment #323737 -
Flags: review?(gijskruitbosch+bugs) → review-
| Assignee | ||
Comment 5•18 years ago
|
||
updated as per comments
Attachment #323737 -
Attachment is obsolete: true
Attachment #323750 -
Flags: review?(gijskruitbosch+bugs)
Comment 6•18 years ago
|
||
Comment on attachment 323750 [details] [diff] [review]
regex a bit stricter
r=me
Attachment #323750 -
Flags: review?(gijskruitbosch+bugs) → review+
| Assignee | ||
Comment 7•18 years ago
|
||
As pointed out by the OP, the same check is also being done in onNotice, so this patch corrects that one too.
Could probably be refactored a bit to some better DRY principles, but I dont really like to mess with the JS-IRC API, so plastering over this one.
Attachment #323750 -
Attachment is obsolete: true
Attachment #323758 -
Flags: review?(gijskruitbosch+bugs)
| Assignee | ||
Comment 8•18 years ago
|
||
i'm an idiot, i might even submit a bug to bugzilla to make it ask me twice whenever i try and post an attachment.
Correct patch this time.
Attachment #323758 -
Attachment is obsolete: true
Attachment #323759 -
Flags: review?(gijskruitbosch+bugs)
Attachment #323758 -
Flags: review?(gijskruitbosch+bugs)
Comment 9•18 years ago
|
||
Comment on attachment 323759 [details] [diff] [review]
the real one
r=me
Attachment #323759 -
Flags: review?(gijskruitbosch+bugs) → review+
Updated•18 years ago
|
Summary: Silent failure with inline CTCP. → Inline CTCP causes messages to get lost
Version: unspecified → Trunk
Comment 10•18 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.124; previous revision: 1.123
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.83]
Updated•1 year ago
|
Product: Other Applications → Other Applications Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•