diff options
author | 2020-04-18 00:08:11 +0200 | |
---|---|---|
committer | 2020-04-18 00:08:11 +0200 | |
commit | 970c99961cbb388452946b952bdb2265ac17424d (patch) | |
tree | c9965ea8da4b01c2e45e63ec69701f8e7827d141 /src/plugins/relay/weechat | |
parent | doc: fix examples of handshake command (relay protocol) (diff) | |
download | weechat-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.c | 4 |
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; } |