Release 2.53 (#5878)
This commit is contained in:
@@ -153,7 +153,12 @@ final class StrictPolicy implements SecurityPolicyInterface
|
||||
}
|
||||
|
||||
if ($obj instanceof User) {
|
||||
if (\in_array($lcm, ['getpassword', 'gettotpsecret', 'getplainpassword', 'getconfirmationtoken', 'gettotpauthenticationconfiguration'], true)) {
|
||||
if (str_contains($lcm, 'password')
|
||||
|| str_contains($lcm, 'totp')
|
||||
|| str_contains($lcm, 'api')
|
||||
|| str_contains($lcm, 'secret')
|
||||
|| str_contains($lcm, 'token')
|
||||
) {
|
||||
throw new SecurityNotAllowedMethodError('Tried to access user secrets', User::class, $method);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user