~emersion/soju#149: 
Unable to attach ##linux after joining ##Linux by mistake

case-mapping

Status
REPORTED
Submitter
~sircmpwn
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
bug downstream

~taiite a month ago

Is this on libera? they redirect ##Linux to #linux, but not ##linux.. I get kicked out of ##linux as soon as i join.

Since they advertise CASEMAPPING=ascii, both channels should be the same[0][1] but, whatever......

This is what must have happened when you asked soju to join ##Linux:

  • soju stored ##Linux in the db, but
  • libera replied with a :sircmpwn JOIN #linux,
  • soju forwarded this message to your client but did not alter the db: the db can only be edited by downstreams,
  • your client got the message and added #linux to its buffer list.

when you type /part:

  • soju forwards it to libera but does not alter the db, because #linux != ##Linux (even with case-mapping),
  • libera replies with :sircmpwn PART #linux,
  • soju forwards the message and your client closes the buffer.

when you type /part ##Linux:

  • soju removes ##Linux from the db and forwards the message to libera,
  • libera replies with ERR_NOTONCHANNEL, since you're on #linux,
  • soju forwards the message and your client shouldn't do anything except print the error.

when you type /part ##linux:

  • soju removes ##Linux from the db the db, because ##linux == ##Linux, because libera advertises CASEMAPPING=ascii,
  • soju forwards the message,
  • libera replies with ERR_NOTONCHANNEL, since you're on #linux,
  • soju forwards the message and your client shouldn't do anything except print the error.

tl;dr: /part #linux to part on libera and /part ##linux to delete the channel in soju's db

[0] https://datatracker.ietf.org/doc/html/rfc2812#section-1.3 [1] https://modern.ircdocs.horse/#casemapping-parameter

~emersion a month ago*

This is about ##linux vs. ##Linux, I don't think ~sircmpwn has ever tried #linux.

I think we're doing a case-mapping unaware string comparison somewhere in the detach/attach code.

Register here or Log in to comment, or comment via email.