Skip to content

Commit aa2f6d9

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 8871442 + aa9865c commit aa2f6d9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Transport/Smtp/Auth/CramMd5Authenticator.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Mailer\Transport\Smtp\Auth;
1313

14+
use Symfony\Component\Mailer\Exception\InvalidArgumentException;
1415
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
1516

1617
/**
@@ -41,6 +42,10 @@ public function authenticate(EsmtpTransport $client): void
4142
*/
4243
private function getResponse(#[\SensitiveParameter] string $secret, string $challenge): string
4344
{
45+
if (!$secret) {
46+
throw new InvalidArgumentException('A non-empty secret is required.');
47+
}
48+
4449
if (\strlen($secret) > 64) {
4550
$secret = pack('H32', md5($secret));
4651
}

0 commit comments

Comments
 (0)