mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-08 13:21:51 +08:00
engine: server: also use constant time string comparison for sv_password
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user