aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/relay/weechat
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-04-18 00:08:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-04-18 00:08:11 +0200
commit970c99961cbb388452946b952bdb2265ac17424d (patch)
treec9965ea8da4b01c2e45e63ec69701f8e7827d141 /src/plugins/relay/weechat
parentdoc: fix examples of handshake command (relay protocol) (diff)
downloadweechat-970c99961cbb388452946b952bdb2265ac17424d.tar.xz
weechat-970c99961cbb388452946b952bdb2265ac17424d.zip
relay: immediately close connection if the handshake failed (weechat protocol)
Diffstat (limited to 'src/plugins/relay/weechat')
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index 4c0da2940..b59eb29d9 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -304,6 +304,10 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(handshake)
relay_weechat_protocol_handshake_reply (client, id);
+ /* if no algo was found, we close the connection immediately */
+ if (client->password_hash_algo < 0)
+ relay_client_set_status (client, RELAY_STATUS_AUTH_FAILED);
+
return WEECHAT_RC_OK;
}