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

irc: check that server option ssl_fingerprint has exactly 40 hexadecimal digits (when set to non-empty value)

This commit is contained in:
Sebastien Helleu
2014-01-21 10:44:35 +01:00
parent 357740f455
commit 1ce23cd331
+10
View File
@@ -1059,6 +1059,16 @@ irc_config_server_check_value_cb (void *data,
return 0;
}
break;
case IRC_SERVER_OPTION_SSL_FINGERPRINT:
if (value && value[0] && (strlen (value) != 40))
{
weechat_printf (NULL,
_("%s%s: fingerprint must have exactly 40 "
"hexadecimal digits"),
weechat_prefix ("error"), IRC_PLUGIN_NAME);
return 0;
}
break;
}
}