Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44fb1ff

Browse files
committed
Fix infinite recursion when passed an empty string
1 parent a5dd57f commit 44fb1ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface
4343
public function __construct($voters = [], $strategy = self::STRATEGY_AFFIRMATIVE, $allowIfAllAbstainDecisions = false, $allowIfEqualGrantedDeniedDecisions = true)
4444
{
4545
$strategyMethod = 'decide'.ucfirst($strategy);
46-
if (!\is_callable([$this, $strategyMethod])) {
46+
if (!\is_callable([$this, $strategyMethod]) || \strlen($strategyMethod) === 6) {
4747
throw new \InvalidArgumentException(sprintf('The strategy "%s" is not supported.', $strategy));
4848
}
4949

0 commit comments

Comments
 (0)