Merge pull request #9969 from Mangesh-Khairnar/increase-password-limit

fix: increase the length of the password
This commit is contained in:
mergify[bot] 2020-04-16 10:30:50 +00:00 committed by GitHub
commit 104381abfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)))