Closed
Bug 1182735
Opened 11 years ago
Closed 11 years ago
irc.oftc.net sends NOTICE before connection
Categories
(Instantbird Graveyard :: Other, defect)
Instantbird Graveyard
Other
Tracking
(Not tracked)
RESOLVED
FIXED
Instantbird 42
People
(Reporter: arlolra, Assigned: clokep)
References
Details
Attachments
(2 files, 1 obsolete file)
|
1.47 KB,
patch
|
clokep
:
review-
|
Details | Diff | Splinter Review |
|
9.70 KB,
patch
|
aleth
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36
Steps to reproduce:
Doesn't respect account._showServerTab
Attachment #8632395 -
Attachment is patch: true
Attachment #8632395 -
Attachment mime type: text/x-patch → text/plain
Attachment #8632395 -
Flags: review?(clokep)
Comment on attachment 8632395 [details] [diff] [review]
oftc.patch
Review of attachment 8632395 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/irc/ircNonStandard.jsm
@@ +45,5 @@
> // directions to users.
> + if (!this.connected && !isAuth &&
> + // But irc.oftc.net's isn't that helpful.
> + !(!this.imAccount._showServerTab &&
> + aMessage.params[1].startsWith("*** Connected securely via"))
Maybe the starts with is unnecessary or a check like (aMessage.params[1].startsWith("***")) is better?
| Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8632395 [details] [diff] [review]
oftc.patch
Review of attachment 8632395 [details] [diff] [review]:
-----------------------------------------------------------------
I need to see the *exact* wire message sent before reviewing this.
I'd love to see tests for this code, by the way. It very much scares me all the hacks around it.
::: chat/protocols/irc/ircNonStandard.jsm
@@ +44,5 @@
> // Some servers , e.g. irc.umich.edu, use NOTICE before connection to give
> // directions to users.
> + if (!this.connected && !isAuth &&
> + // But irc.oftc.net's isn't that helpful.
> + !(!this.imAccount._showServerTab &&
Does this._showServerTab not work? I'm skeptical of checking this flag here.
Attachment #8632395 -
Flags: review?(clokep) → review-
The exact wire message is,
{"rawMessage":":beauty.oftc.net NOTICE myusername :*** Connected securely via UNKNOWN AES128-SHA-128","command":"NOTICE","params":["myusername","*** Connected securely via UNKNOWN AES128-SHA-128"],"origin":"beauty.oftc.net","tags":{},"source":""}
and this arrives before 001.
| Assignee | ||
Comment 4•11 years ago
|
||
Instead of adding more hacks onto that NOTICE handler, I rewrote it to be clearer about what we expect. This does slightly change behavior (see the changes to the tests), but overall I think is more consistent.
Assignee: nobody → clokep
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8637082 -
Flags: review?(aleth)
| Assignee | ||
Comment 5•11 years ago
|
||
Oops, I attached the wrong patch last time!
Attachment #8637082 -
Attachment is obsolete: true
Attachment #8637082 -
Flags: review?(aleth)
Attachment #8637308 -
Flags: review?(aleth)
Comment 6•11 years ago
|
||
Comment on attachment 8637308 [details] [diff] [review]
Patch v2 for real
Review of attachment 8637308 [details] [diff] [review]:
-----------------------------------------------------------------
Looks like a good improvement! r+ with comments fixed/added.
::: chat/protocols/irc/ircNonStandard.jsm
@@ -33,5 @@
> - // user. Generally AUTH messages start with ***, but this could pretty
> - // easily be faked.
> - // Freenode simply sends * for the target. Moznet sends Auth (used to send
> - // AUTH); in this case, check if the user's nickname is not auth, or the
> - // the message starts with ***.
Some of this useful comment seems to have gone missing.
::: chat/protocols/irc/test/test_ircNonStandard.js
@@ +108,5 @@
> do_check_true(account.shouldAuthenticate === false);
>
> // Finally, check if the message is wrong.
> account = new FakeAccount("password");
> + message.params[1] = "Test";
Why are we setting this param? A comment would be nice.
Attachment #8637308 -
Flags: review?(aleth) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
This includes an updated comment that aleth reviewed in person.
https://hg.mozilla.org/comm-central/rev/1072781ba002
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.6
| Assignee | ||
Comment 8•11 years ago
|
||
Updating milestone from 1.6 to 42.
Target Milestone: 1.6 → Instantbird 42
You need to log in
before you can comment on or make changes to this bug.
Description
•