1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

relay: immediately close connection if the handshake failed (weechat protocol)

This commit is contained in:
Sébastien Helleu
2020-04-18 00:08:11 +02:00
parent 242c378290
commit 970c99961c
4 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -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_
+2 -1
View File
@@ -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_
+2 -1
View File
@@ -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_
@@ -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;
}