From feba8878d9739490c2240bc29cacfe022c86f5f3 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Thu, 16 Apr 2020 14:26:55 +0530 Subject: [PATCH] fix: increase the length of the password to maximum possible under current structure --- frappe/utils/password.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frappe/utils/password.py b/frappe/utils/password.py index da5cdecc55..b939607b19 100644 --- a/frappe/utils/password.py +++ b/frappe/utils/password.py @@ -131,9 +131,9 @@ def create_auth_table(): frappe.db.create_auth_table() def encrypt(pwd): - if len(pwd) > 100: - # encrypting > 100 chars will lead to truncation - frappe.throw(_('Password cannot be more than 100 characters long')) + if len(pwd) > 127: + # encrypting > 127 chars will lead to truncation + frappe.throw(_('Password cannot be more than 127 characters long')) cipher_suite = Fernet(encode(get_encryption_key())) cipher_text = cstr(cipher_suite.encrypt(encode(pwd)))