Skip to content

UHNAMES Race Condition #2289

@half-duplex

Description

@half-duplex

Description

When Sopel joins a server that supports UHNAMES but not the userhost-in-names CAP, it sends PROTOCTL UHNAMES to accomplish the same goal.

In my testing, this results in:

>> CAP LS 302
>> NICK Sopel
>> USER ...
<< 001 ...
>> JOIN #test
<< 005 [...] UHNAMES
>> PROTOCTL UHNAMES
<< JOIN #test
<< 353 Sopel = #test :@Op Sopel

Followed by an exception (expected 2 to unpack, got 1) on coretasks.py:524

Sending PROTOCTL UHNAMES before the JOIN seems to work.

The same problem may exist with the CAP, if not in practice, than in theory.

Previously: #2102

Reproduction steps

  1. Find a server with UHNAMES but no userhost-in-names
  2. Configure Sopel to connect to it and join a channel
  3. Start sopel
  4. Note exception

Expected behavior

Joins without exception

Environment

  • Sopel .version: 36b7c2f
  • Sopel installed via: pip
  • Python version: 3.9.2
  • Operating system: Debian 10
  • IRCd /version: InspIRCd 2

Notes

@dgw broke it

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions