From f2d4ff6dc42381609bf446805d3f9aa1a8c67c1e Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sat, 3 May 2025 16:13:30 +0800 Subject: [PATCH] Update dashboard.py Fixed the issue where TOTP Key is not actually reset when reset. --- src/dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashboard.py b/src/dashboard.py index db9581e..d144489 100644 --- a/src/dashboard.py +++ b/src/dashboard.py @@ -2957,7 +2957,7 @@ def API_isTotpEnabled(): @app.get(f'{APP_PREFIX}/api/Welcome_GetTotpLink') def API_Welcome_GetTotpLink(): if not DashboardConfig.GetConfig("Account", "totp_verified")[1]: - DashboardConfig.SetConfig("Account", "totp_key", pyotp.random_base32()) + DashboardConfig.SetConfig("Account", "totp_key", pyotp.random_base32(), True) return ResponseObject( data=pyotp.totp.TOTP(DashboardConfig.GetConfig("Account", "totp_key")[1]).provisioning_uri( issuer_name="WGDashboard"))