提交 f9cc8c60 编写于 作者: Z Zhangyifan

设置非latin1字符的用户名密码提示

上级 d0d5c7dd
...@@ -79,7 +79,7 @@ if __name__ == "__main__": ...@@ -79,7 +79,7 @@ if __name__ == "__main__":
err = latin1_encode(password_) err = latin1_encode(password_)
if err: if err:
usage() usage()
print("PASSWORD: outside the 'latin-1' character set range") print("PASSWORD: only latin1 character set are allowed")
sys.exit(1) sys.exit(1)
ret = password_strength_check(password_) ret = password_strength_check(password_)
......
...@@ -143,10 +143,10 @@ def params_input_track(params, file_path=None): ...@@ -143,10 +143,10 @@ def params_input_track(params, file_path=None):
err = latin1_encode(user) err = latin1_encode(user)
if err: if err:
return "error", "user: outside the 'latin-1' character set range" return "error", "ERROR: user: only latin1 character set are allowed."
err = latin1_encode(password) err = latin1_encode(password)
if err: if err:
return "error", "password: outside the 'latin-1' character set range" return "error", "ERROR: user: only latin1 character set are allowed."
enabled = bool(enabled == 'true') enabled = bool(enabled == 'true')
...@@ -237,10 +237,12 @@ def delete(args): ...@@ -237,10 +237,12 @@ def delete(args):
err = latin1_encode(user) err = latin1_encode(user)
if err: if err:
return "error", "user: outside the 'latin-1' character set range" print("ERROR: user: only latin1 character set are allowed.")
return
err = latin1_encode(password) err = latin1_encode(password)
if err: if err:
return "error", "password: outside the 'latin-1' character set range" print("ERROR: password: Only latin1 character set are allowed.")
return
url = '/'.join(['https:/', server, 'tracking']) url = '/'.join(['https:/', server, 'tracking'])
if args.branch: if args.branch:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册