mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
relay: fix comparison of server nonce with UTF-8 chars (issue #1739)
There is no problem in practice because this server nonce is generated by WeeChat itself and encoded to base64, so it never contains any UTF-8 char on more than one byte.
This commit is contained in:
@@ -276,8 +276,9 @@ relay_auth_check_salt (struct t_relay_client *client, const char *salt_hexa)
|
||||
return (salt_hexa
|
||||
&& client->nonce
|
||||
&& (strlen (salt_hexa) > strlen (client->nonce))
|
||||
&& (weechat_strncasecmp (salt_hexa, client->nonce,
|
||||
strlen (client->nonce)) == 0)) ? 1 : 0;
|
||||
&& (weechat_strncasecmp (
|
||||
salt_hexa, client->nonce,
|
||||
weechat_utf8_strlen (client->nonce)) == 0)) ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user