diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-18 00:08:11 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-04-18 00:08:11 +0200 |
commit | 970c99961cbb388452946b952bdb2265ac17424d (patch) | |
tree | c9965ea8da4b01c2e45e63ec69701f8e7827d141 | |
parent | 242c37829086d5f1ca2bacb4524f40a535ed7d2d (diff) | |
download | weechat-970c99961cbb388452946b952bdb2265ac17424d.zip |
relay: immediately close connection if the handshake failed (weechat protocol)
-rw-r--r-- | doc/en/weechat_relay_protocol.en.adoc | 3 | ||||
-rw-r--r-- | doc/fr/weechat_relay_protocol.fr.adoc | 3 | ||||
-rw-r--r-- | doc/ja/weechat_relay_protocol.ja.adoc | 3 | ||||
-rw-r--r-- | src/plugins/relay/weechat/relay-weechat-protocol.c | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/doc/en/weechat_relay_protocol.en.adoc b/doc/en/weechat_relay_protocol.en.adoc index bc787ef03..924179874 100644 --- a/doc/en/weechat_relay_protocol.en.adoc +++ b/doc/en/weechat_relay_protocol.en.adoc @@ -149,7 +149,8 @@ WeeChat replies with a hashtable containing the following keys and values: * _password_hash_algo_: the password authentication negotiated: supported by both the client and _relay_: -** (empty value): negotiation failed, password authentication is *NOT* possible +** (empty value): negotiation failed, password authentication is *NOT* possible; + in this case the connection with the client is immediately closed ** _plain_ ** _sha256_ ** _sha512_ diff --git a/doc/fr/weechat_relay_protocol.fr.adoc b/doc/fr/weechat_relay_protocol.fr.adoc index 37eed354c..4c102a5b9 100644 --- a/doc/fr/weechat_relay_protocol.fr.adoc +++ b/doc/fr/weechat_relay_protocol.fr.adoc @@ -158,7 +158,8 @@ suivantes : * _password_hash_algo_ : l'authentification mot de passe négociée : supportée par le client et _relay_ : ** (valeur vide) : la négociation a échoué, l'authentification par mot de passe - n'est *PAS* possible + n'est *PAS* possible ; dans ce cas la connexion avec le client est + immédiatement fermée ** _plain_ ** _sha256_ ** _sha512_ diff --git a/doc/ja/weechat_relay_protocol.ja.adoc b/doc/ja/weechat_relay_protocol.ja.adoc index 31a5f02d6..13245aff5 100644 --- a/doc/ja/weechat_relay_protocol.ja.adoc +++ b/doc/ja/weechat_relay_protocol.ja.adoc @@ -158,7 +158,8 @@ WeeChat replies with a hashtable containing the following keys and values: * _password_hash_algo_: the password authentication negotiated: supported by both the client and _relay_: -** (empty value): negotiation failed, password authentication is *NOT* possible +** (empty value): negotiation failed, password authentication is *NOT* possible; + in this case the connection with the client is immediately closed ** _plain_ ** _sha256_ ** _sha512_ 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; } |