mirror of
https://github.com/irssi/irssi.git
synced 2025-04-25 20:41:23 -05:00
Merge pull request #21 from ailin-nemui/sasl-plain-nonull
only enable sasl plain when username and password are set
This commit is contained in:
commit
fe09dccdcb
@ -121,9 +121,9 @@ static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn,
|
||||
if (ircnet->sasl_mechanism != NULL) {
|
||||
if (!g_ascii_strcasecmp(ircnet->sasl_mechanism, "plain")) {
|
||||
/* The PLAIN method needs both the username and the password */
|
||||
conn->sasl_mechanism = SASL_MECHANISM_PLAIN;
|
||||
if (ircnet->sasl_username != NULL && *ircnet->sasl_username &&
|
||||
ircnet->sasl_password != NULL && *ircnet->sasl_password) {
|
||||
conn->sasl_mechanism = SASL_MECHANISM_PLAIN;
|
||||
conn->sasl_username = g_strdup(ircnet->sasl_username);
|
||||
conn->sasl_password = g_strdup(ircnet->sasl_password);
|
||||
} else
|
||||
|
Loading…
x
Reference in New Issue
Block a user