From 001acd60ac9e2aed1b9b36ba05b374e0130c43a2 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Thu, 3 Nov 2022 16:44:18 +0100 Subject: [PATCH] doh2 --- core/admin/mailu/utils.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/admin/mailu/utils.py b/core/admin/mailu/utils.py index 4c55e27d..f160fe3f 100644 --- a/core/admin/mailu/utils.py +++ b/core/admin/mailu/utils.py @@ -509,12 +509,12 @@ def gen_temp_token(email, session): return token def isBadOrPwned(form): - try: - if len(form.pw.data) < 8: - return "This password is too short." - breaches = int(form.pwned.data) - except ValueError: - breaches = -1 - if breaches > 0: - return f"This password appears in {breaches} data breaches! It is not unique; please change it." + try: + if len(form.pw.data) < 8: + return "This password is too short." + breaches = int(form.pwned.data) + except ValueError: + breaches = -1 + if breaches > 0: + return f"This password appears in {breaches} data breaches! It is not unique; please change it." return None