mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Make sure SASL was actually requested before failing.
This commit is contained in:
parent
77ff8f5b74
commit
7e22d051ae
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
fe-sasl.c : irssi
|
fe-sasl.c : irssi
|
||||||
|
|
||||||
Copyright (C) 2015 The Lemon Man
|
Copyright (C) 2015-2017 The Lemon Man
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -22,6 +22,8 @@
|
|||||||
#include "module-formats.h"
|
#include "module-formats.h"
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "levels.h"
|
#include "levels.h"
|
||||||
|
#include "misc.h"
|
||||||
|
#include "sasl.h"
|
||||||
|
|
||||||
#include "irc-servers.h"
|
#include "irc-servers.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
@ -43,6 +45,7 @@ static void sig_cap_end(IRC_SERVER_REC *server)
|
|||||||
/* The negotiation has now been terminated, if we didn't manage to
|
/* The negotiation has now been terminated, if we didn't manage to
|
||||||
* authenticate successfully with the server just disconnect. */
|
* authenticate successfully with the server just disconnect. */
|
||||||
if (!server->sasl_success &&
|
if (!server->sasl_success &&
|
||||||
|
server->connrec->sasl_mechanism != SASL_MECHANISM_NONE &&
|
||||||
settings_get_bool("sasl_disconnect_on_failure")) {
|
settings_get_bool("sasl_disconnect_on_failure")) {
|
||||||
/* We can't use server_disconnect() here because we'd end up
|
/* We can't use server_disconnect() here because we'd end up
|
||||||
* freeing the 'server' object and be guilty of a slew of UaF. */
|
* freeing the 'server' object and be guilty of a slew of UaF. */
|
||||||
|
Loading…
Reference in New Issue
Block a user