engine: server: also use constant time string comparison for sv_password

This commit is contained in:
Alibek Omarov
2026-05-17 11:26:53 +05:00
parent c2c781f039
commit cb04e9cbd5

View File

@@ -361,7 +361,7 @@ static void SV_ConnectClient( netadr_t from )
// check connection password (don't verify local client)
if( !NET_IsLocalAddress( from ) && SV_HavePassword( ))
{
if( Q_stricmp( sv_password.string, Info_ValueForKey( userinfo, "password" )))
if( Q_strcmp_constant_time( sv_password.string, Info_ValueForKey( userinfo, "password" )))
{
SV_RejectConnection( from, "invalid password\n" );
return;