matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
462 stars 151 forks source link

Libera Chat authetication fail when password contains whitespace #1588

Open etanot opened 2 years ago

etanot commented 2 years ago

Describe the bug

When Libera.Chat password contains whitespace(s), we couldn't authenticate to the service using appservice. We're also getting a nickname registered error message via NickServ service. As soon as we change our password, which doesn't contain any whitespace(s), we successfully authenticate to the service. This issue is reproducible on Libera.Chat's IRC bridge maintained by Matrix team.

Steps to reproduce the behavior:

First change our Libera.Chat account's password, so that it would contains whitespace. And then run following commands in admin (/appservice) room:

!nick <Nick>
!username <username>
!storepass <password containing white spaces>
!reconnect

Actual behavior

Reconnect request fails and we get a This nickname is registered. Please choose a different nickname, or identify via /msg NickServ IDENTIFY error message in NickServ room.

Expected behavior

Reconnect request should succeed and we should be logged-in into the service.

Additional context

Unlike appservice, NickServ service accepts password with whitespace. For example, running IDENTIFY <username> password containing white spaces command in NickServ room will successfully execute the command and we'll be logged-in into the service. But this wouldn't setup SASL authentication in the bridge, so fixing this issue would allow us to have password as passphrase with SASL authentication support.