From 39ea434c00ba28c61ed6b2df63ab81f75137edbe Mon Sep 17 00:00:00 2001 From: David Duque Date: Sat, 11 Jul 2020 16:15:18 +0100 Subject: [PATCH] Drop requirement for passwords to have no spaces --- management/mailconfig.py | 2 -- tools/mail.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index dd597cd6..b061ea7d 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -605,8 +605,6 @@ def validate_password(pw): # validate password if pw.strip() == "": raise ValueError("No password provided.") - if re.search(r"[\s]", pw): - raise ValueError("Passwords cannot contain spaces.") if len(pw) < 8: raise ValueError("Passwords must be at least eight characters.") diff --git a/tools/mail.py b/tools/mail.py index 566971e4..215f39eb 100755 --- a/tools/mail.py +++ b/tools/mail.py @@ -33,9 +33,6 @@ def read_password(): if len(first) < 8: print("Passwords must be at least eight characters.") continue - if re.search(r'[\s]', first): - print("Passwords cannot contain spaces.") - continue second = getpass.getpass(' (again): ') if first != second: print("Passwords not the same. Try again.")