fix irssi SASL negotiation with multiple CAP ACK

when attempting SASL, if multiple CAP ACK were received (for example,
because a script sent an additional CAP REQ), then any not containing
`sasl` would cause SASL to fail (immediately aborting the connection
with no message, depending on sasl_disconnect_on_failure setting)

check not only if SASL is set in this line, but also if we've already
seen it in a previous line.
This commit is contained in:
steering7253 2025-04-07 13:53:39 -06:00
parent ee4471a118
commit 49d7302e98
No known key found for this signature in database
GPG Key ID: 66B26E9D823D8647

View File

@ -234,7 +234,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
}
}
else if (!g_ascii_strcasecmp(evt, "ACK")) {
int got_sasl = FALSE;
int got_sasl = (i_slist_find_string(server->cap_active, "sasl") != NULL);
/* Emit a signal for every ack'd cap */
for (i = 0; i < caps_length; i++) {