summaryrefslogtreecommitdiff
path: root/src/fe-common/irc
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-12-23 17:59:55 +0100
committerLemonBoy <thatlemon@gmail.com>2017-01-01 23:08:38 +0100
commit7e22d051ae699467575d1feeec6d8e2e2f16721f (patch)
tree5cba9c2f02cd97952c0ed878a4bd0098c070f5f5 /src/fe-common/irc
parent77ff8f5b7467dceb2e2f90e0e0aa5157cbb909ec (diff)
downloadirssi-7e22d051ae699467575d1feeec6d8e2e2f16721f.zip
Make sure SASL was actually requested before failing.
Diffstat (limited to 'src/fe-common/irc')
-rw-r--r--src/fe-common/irc/fe-sasl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-sasl.c b/src/fe-common/irc/fe-sasl.c
index 6cba1887..fc8105fc 100644
--- a/src/fe-common/irc/fe-sasl.c
+++ b/src/fe-common/irc/fe-sasl.c
@@ -1,7 +1,7 @@
/*
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
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,8 @@
#include "module-formats.h"
#include "signals.h"
#include "levels.h"
+#include "misc.h"
+#include "sasl.h"
#include "irc-servers.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
* authenticate successfully with the server just disconnect. */
if (!server->sasl_success &&
+ server->connrec->sasl_mechanism != SASL_MECHANISM_NONE &&
settings_get_bool("sasl_disconnect_on_failure")) {
/* We can't use server_disconnect() here because we'd end up
* freeing the 'server' object and be guilty of a slew of UaF. */