View Issue Details

IDProjectCategoryView StatusLast Update
0004958unrealircdpublic2017-06-02 08:25
Reporterjwheare Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.0.11 
Fixed in Version4.0.12.1 
Summary0004958: CAP NAK not sent for unrecognised CAPs in all cases
DescriptionLooks like a bug in argument counting/processing in m_cap cap_req:
https://github.com/unrealircd/unrealircd/blob/6c3c55b4e524fffd7ef0ccb526af0218397996da/src/modules/m_cap.c#L286

Tested on irc.unrealircd.org:6667

FAIL: Unknown CAP req on its own -> empty ACK, should be NAK
C: CAP REQ unknown
S: :irc1.unrealircd.org CAP nick ACK :

PASS: Unknown CAP req before known CAP -> correctly NAKed
C: CAP REQ :unknown tls
S :irc1.unrealircd.org CAP nick NAK :unknown tls

PASS: Two unknown CAP reqs -> correctly NAKed
C: CAP REQ :unknown1 unknown2
S :irc1.unrealircd.org CAP nick NAK :unknown1 unknown2

FAIL: Unknown CAP req after known CAP -> ACK, should be NAK
C: CAP REQ :tls unknown
S :irc1.unrealircd.org CAP nick ACK :tls
TagsNo tags attached.
3rd party modules

Activities

syzop

2017-06-02 08:25

administrator   ~0019787

Should be fixed now. Thanks for the report.

Was some nenolod logic error (one of many). In this case he didn't differentiate between "we have processed all commands" and "there were no errors". Amazing.

https://github.com/unrealircd/unrealircd/commit/d27d3760c746ad00df3456f6c48a0a6644aadd45

Issue History

Date Modified Username Field Change
2017-05-31 18:13 jwheare New Issue
2017-06-02 08:25 syzop Assigned To => syzop
2017-06-02 08:25 syzop Status new => resolved
2017-06-02 08:25 syzop Resolution open => fixed
2017-06-02 08:25 syzop Fixed in Version => 4.0.12.1
2017-06-02 08:25 syzop Note Added: 0019787