鏡像自
https://github.com/mail-in-a-box/mailinabox.git
已同步 2026-10-02 03:15:12 +02:00
Drop requirement for passwords to have no spaces (#1789)
此提交包含在:
@@ -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.")
|
||||
|
||||
|
||||
@@ -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.")
|
||||
|
||||
新增問題並參考
封鎖使用者