1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Fixed guest user email showing in TOTP setup url

- Occured during enforced MFA setup upon login.
- Added test to cover.

Fixes #2971
This commit is contained in:
Dan Brown
2021-10-14 18:02:16 +01:00
parent d21b60079c
commit c9c0e5e16f
3 changed files with 23 additions and 3 deletions

View File

@ -31,7 +31,7 @@ class MfaTotpController extends Controller
session()->put(static::SETUP_SECRET_SESSION_KEY, encrypt($totpSecret));
}
$qrCodeUrl = $totp->generateUrl($totpSecret);
$qrCodeUrl = $totp->generateUrl($totpSecret, $this->currentOrLastAttemptedUser());
$svg = $totp->generateQrCodeSvg($qrCodeUrl);
return view('mfa.totp-generate', [