Skip to content

Commit 9ef76e3

Browse files
Merge branch '6.4' into 7.0
* 6.4: [WebProfilerBundle][TwigBundle] Add conflicts with 7.0 Check whether secrets are empty and mark them all as sensitive [HttpKernel] Add `ControllerResolver::allowControllers()` to define which callables are legit controllers when the `_check_controller_is_allowed` request attribute is set
2 parents d6892b2 + 073e568 commit 9ef76e3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Authenticator/RememberMeAuthenticator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
2020
use Symfony\Component\Security\Core\Exception\AuthenticationException;
2121
use Symfony\Component\Security\Core\Exception\CookieTheftException;
22+
use Symfony\Component\Security\Core\Exception\InvalidArgumentException;
2223
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
2324
use Symfony\Component\Security\Core\Exception\UserNotFoundException;
2425
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
@@ -51,6 +52,10 @@ class RememberMeAuthenticator implements InteractiveAuthenticatorInterface
5152

5253
public function __construct(RememberMeHandlerInterface $rememberMeHandler, #[\SensitiveParameter] string $secret, TokenStorageInterface $tokenStorage, string $cookieName, LoggerInterface $logger = null)
5354
{
55+
if (!$secret) {
56+
throw new InvalidArgumentException('A non-empty secret is required.');
57+
}
58+
5459
$this->rememberMeHandler = $rememberMeHandler;
5560
$this->secret = $secret;
5661
$this->tokenStorage = $tokenStorage;

RateLimiter/DefaultLoginRateLimiter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ final class DefaultLoginRateLimiter extends AbstractRequestRateLimiter
3636
*/
3737
public function __construct(RateLimiterFactory $globalFactory, RateLimiterFactory $localFactory, #[\SensitiveParameter] string $secret = '')
3838
{
39-
if ('' === $secret) {
39+
if (!$secret) {
4040
throw new InvalidArgumentException('A non-empty secret is required.');
4141
}
42+
4243
$this->globalFactory = $globalFactory;
4344
$this->localFactory = $localFactory;
4445
$this->secret = $secret;

0 commit comments

Comments
 (0)