From 5b80166bedb37ea9397b9d24a02c155e41aa8234 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 16 Mar 2023 17:17:53 +0200 Subject: [PATCH] 2fa -> two-factor authentication --- files/routes/login.py | 6 +++--- files/routes/wrappers.py | 2 +- files/templates/email/2fa_remove.html | 2 +- files/templates/login/login_2fa.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/files/routes/login.py b/files/routes/login.py index 377a777c0..02dd0dbcf 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -482,7 +482,7 @@ def post_reset(v:Optional[User]): @limiter.limit(DEFAULT_RATELIMIT) @auth_desired def lost_2fa(v:Optional[User]): - if v and not v.mfa_secret: abort(400, "You don't have 2FA enabled") + if v and not v.mfa_secret: abort(400, "You don't have two-factor authentication enabled") return render_template("login/lost_2fa.html", v=v) @app.post("/lost_2fa") @@ -514,7 +514,7 @@ def lost_2fa_post(): action_url=f"{SITE_FULL}/reset_2fa?id={user.id}&t={valid}&token={token}" send_mail(to_address=user.email, - subject="2FA Removal Request", + subject="Two-factor Authentication Removal Request", html=render_template("email/2fa_remove.html", action_url=action_url, v=user) @@ -536,7 +536,7 @@ def reset_2fa(): abort(400) if now > t+3600*24: - abort(410, "This 2FA reset link has expired!") + abort(410, "This two-factor authentication reset link has expired!") token=request.values.get("token") uid=request.values.get("id") diff --git a/files/routes/wrappers.py b/files/routes/wrappers.py index cb8eeaa2e..e7a64c45d 100644 --- a/files/routes/wrappers.py +++ b/files/routes/wrappers.py @@ -131,7 +131,7 @@ def admin_level_required(x): if not v: abort(401) if v.admin_level < x: abort(403) if x and SITE != 'devrama.net' and not IS_LOCALHOST and not v.mfa_secret: - abort(403, "You need to enable 2FA to use admin features!") + abort(403, "You need to enable two-factor authentication to use admin features!") return make_response(f(*args, v=v, **kwargs)) wrapper.__name__ = f.__name__ diff --git a/files/templates/email/2fa_remove.html b/files/templates/email/2fa_remove.html index 86dd82ec8..4a2fcb9b9 100644 --- a/files/templates/email/2fa_remove.html +++ b/files/templates/email/2fa_remove.html @@ -13,7 +13,7 @@
- Remove 2FA + Remove two-factor authentication diff --git a/files/templates/login/login_2fa.html b/files/templates/login/login_2fa.html index 4b463abba..eb71846e2 100644 --- a/files/templates/login/login_2fa.html +++ b/files/templates/login/login_2fa.html @@ -20,7 +20,7 @@ - Lost your 2FA device? + Lost your two-factor authentication device?