mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
N°7516 - Code hardening
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user