From 4a04e9f9dcf385dd417a37657bbbc012d684080a Mon Sep 17 00:00:00 2001
From: barredterra <14891507+barredterra@users.noreply.github.com>
Date: Tue, 26 Jul 2022 09:56:19 +0200
Subject: [PATCH] fix: appropriate password hint
---
frappe/core/doctype/user/user.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py
index 232e915435..e7ea8b203a 100644
--- a/frappe/core/doctype/user/user.py
+++ b/frappe/core/doctype/user/user.py
@@ -1045,10 +1045,9 @@ def notify_admin_access_to_system_manager(login_manager=None):
def handle_password_test_fail(result):
suggestions = result["feedback"]["suggestions"][0] if result["feedback"]["suggestions"] else ""
warning = result["feedback"]["warning"] if "warning" in result["feedback"] else ""
- suggestions += (
- "
" + _("Hint: Include symbols, numbers and capital letters in the password") + "
"
- )
- frappe.throw(" ".join([_("Invalid Password:"), warning, suggestions]))
+ suggestions += f"
{_('Your password is too short or not complex enough.')}
"
+
+ frappe.throw(" ".join([warning, suggestions]), title=_("Invalid Password"))
def update_gravatar(name):