N°7516 - Code hardening

This commit is contained in:
Eric Espie
2024-06-20 16:28:38 +02:00
parent 0028b3cf17
commit 4426e2adfe

View File

@@ -529,7 +529,6 @@ class ContextManipulatorHelper
*/
public static function EncodeRulesToken($aTokenRules)
{
$aTokenRules['user_id'] = UserRights::GetUserId();
$aTokenRules['salt'] = base64_encode(random_bytes(8));
$sPPrivateKey = self::GetPrivateKey();
@@ -575,12 +574,6 @@ class ContextManipulatorHelper
throw new Exception('DecodeRulesToken not a proper json structure.');
}
// Verify user id
if ($aTokenRules['user_id'] !== UserRights::GetUserId())
{
throw new Exception('DecodeRulesToken user id does not match.');
}
return $aTokenRules;
}