Drop requirement for passwords to have no spaces (#1789)

This commit is contained in:
David Duque 2020-07-16 12:23:11 +01:00 committed by GitHub
parent 1b2711fc42
commit 967409b157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 5 deletions

View file

@ -605,8 +605,6 @@ def validate_password(pw):
# validate password # validate password
if pw.strip() == "": if pw.strip() == "":
raise ValueError("No password provided.") raise ValueError("No password provided.")
if re.search(r"[\s]", pw):
raise ValueError("Passwords cannot contain spaces.")
if len(pw) < 8: if len(pw) < 8:
raise ValueError("Passwords must be at least eight characters.") raise ValueError("Passwords must be at least eight characters.")

View file

@ -33,9 +33,6 @@ def read_password():
if len(first) < 8: if len(first) < 8:
print("Passwords must be at least eight characters.") print("Passwords must be at least eight characters.")
continue continue
if re.search(r'[\s]', first):
print("Passwords cannot contain spaces.")
continue
second = getpass.getpass(' (again): ') second = getpass.getpass(' (again): ')
if first != second: if first != second:
print("Passwords not the same. Try again.") print("Passwords not the same. Try again.")