Capability parsing is incorrect (parameter vs final parameter confusion)

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: bugzilla-mozilla-20000923, Assigned: bugzilla-mozilla-20000923)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(firefox47 affected)

Details

(Whiteboard: [cz-0.9.93], URL)

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
It seems there is some confusion over the CAP LS parsing:

[>>]       CAP LS
[<<]       :fripp.mozilla.org CAP James_ LS :multi-prefix sasl userhost-in-names
[INFO]     Available capabilities: multi-prefix sasl userhost-in-names
[EVAL-IN]  dumpObjectTree(e.server.caps)
[EVAL-OUT] + multi-prefix sasl userhost-in-names (object) null
           *

This is because the CZ code is expecting each capability to be another parameter, but in fact it is a list within a single (the final) parameter.
(Assignee)

Updated

3 years ago
Assignee: rginda → bugzilla-mozilla-20000923
Status: NEW → ASSIGNED
(Assignee)

Updated

3 years ago
Blocks: 687798
(Assignee)

Comment 1

3 years ago
Created attachment 8716806 [details] [diff] [review]
Split list of capabilities from parameter 3
Attachment #8716806 - Flags: review?(gijskruitbosch+bugs)

Comment 2

3 years ago
Comment on attachment 8716806 [details] [diff] [review]
Split list of capabilities from parameter 3

Review of attachment 8716806 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/lib/irc.js
@@ +2001,5 @@
>           * null (if they don't exist) to indicate we don't know if they're
>           * enabled or not (but this will evaluate to false which matches that
>           * capabilities are only enabled on request).
>           */
> +        var caps = e.params[3].split(' ');

Nit: split(/\s+/) please so that we won't trip over multiple spaces / people using tabs / other wonky spacing characters.
Attachment #8716806 - Flags: review?(gijskruitbosch+bugs) → review+
(Assignee)

Comment 3

3 years ago
With nit fixed.

http://hg.mozilla.org/chatzilla/rev/d63b7cf65e93
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
(Assignee)

Updated

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