We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c445b16 commit aa9865cCopy full SHA for aa9865c
Transport/Smtp/Auth/CramMd5Authenticator.php
@@ -11,6 +11,7 @@
11
12
namespace Symfony\Component\Mailer\Transport\Smtp\Auth;
13
14
+use Symfony\Component\Mailer\Exception\InvalidArgumentException;
15
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport;
16
17
/**
@@ -41,6 +42,10 @@ public function authenticate(EsmtpTransport $client): void
41
42
*/
43
private function getResponse(#[\SensitiveParameter] string $secret, string $challenge): string
44
{
45
+ if (!$secret) {
46
+ throw new InvalidArgumentException('A non-empty secret is required.');
47
+ }
48
+
49
if (\strlen($secret) > 64) {
50
$secret = pack('H32', md5($secret));
51
}
0 commit comments