Skip to content

Commit 8af5951

Browse files
committed
Require spomky-labs/otphp version 11.4
1 parent fa3e667 commit 8af5951

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

app/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"endroid/qr-code": "^6.0",
1111
"lcobucci/clock": "^3.0",
1212
"lcobucci/jwt": "^5.0",
13-
"spomky-labs/otphp": "^11.3",
13+
"spomky-labs/otphp": "^11.4",
1414
"symfony/console": "^7.4 || ^8.0",
1515
"symfony/doctrine-bridge": "^7.4 || ^8.0",
1616
"symfony/dotenv": "^7.4 || ^8.0",

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"ext-json": "*",
1717
"lcobucci/clock": "^3.0",
1818
"lcobucci/jwt": "^5.0",
19-
"spomky-labs/otphp": "^11.3",
19+
"spomky-labs/otphp": "^11.4",
2020
"symfony/config": "^7.4 || ^8.0",
2121
"symfony/dependency-injection": "^7.4 || ^8.0",
2222
"symfony/event-dispatcher": "^7.4 || ^8.0",

src/google-authenticator/Security/TwoFactor/Provider/Google/GoogleTotpFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ public function createTotpForUser(TwoFactorInterface $user): TOTPInterface
3535
$totp = TOTP::create($secret, 30, 'sha1', $this->digits, clock: $this->clock);
3636

3737
$userAndHost = $user->getGoogleAuthenticatorUsername().(null !== $this->server && $this->server ? '@'.$this->server : '');
38-
$totp->setLabel($userAndHost);
38+
if ('' !== $userAndHost) {
39+
$totp->setLabel($userAndHost);
40+
}
3941

4042
if (null !== $this->issuer && $this->issuer) {
4143
$totp->setIssuer($this->issuer);

src/google-authenticator/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"require": {
1515
"php": "~8.4.0 || ~8.5.0",
1616
"scheb/2fa-bundle": "self.version",
17-
"spomky-labs/otphp": "^11.3"
17+
"spomky-labs/otphp": "^11.4"
1818
},
1919
"suggest": {
2020
"symfony/validator": "Needed if you want to use the Google Authenticator TOTP validator constraint"

src/totp/Security/TwoFactor/Provider/Totp/TotpFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class TotpFactory
1818
{
1919
/**
20-
* @param array<string,mixed> $customParameters
20+
* @param array<non-empty-string,mixed> $customParameters
2121
*/
2222
public function __construct(
2323
private readonly string|null $server,
@@ -49,7 +49,9 @@ public function createTotpForUser(TwoFactorInterface $user): TOTPInterface
4949
);
5050

5151
$userAndHost = $user->getTotpAuthenticationUsername().(null !== $this->server && $this->server ? '@'.$this->server : '');
52-
$totp->setLabel($userAndHost);
52+
if ('' !== $userAndHost) {
53+
$totp->setLabel($userAndHost);
54+
}
5355

5456
if (null !== $this->issuer && $this->issuer) {
5557
$totp->setIssuer($this->issuer);

src/totp/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"require": {
1515
"php": "~8.4.0 || ~8.5.0",
1616
"scheb/2fa-bundle": "self.version",
17-
"spomky-labs/otphp": "^11.3"
17+
"spomky-labs/otphp": "^11.4"
1818
},
1919
"suggest": {
2020
"symfony/validator": "Needed if you want to use the TOTP validator constraint"

0 commit comments

Comments
 (0)