init
This commit is contained in:
@@ -38,6 +38,7 @@ jinja2
|
||||
# JWT认证
|
||||
python-jose[cryptography]
|
||||
passlib[bcrypt]
|
||||
bcrypt
|
||||
|
||||
# 邮箱验证
|
||||
email-validator
|
||||
|
||||
@@ -21,6 +21,8 @@ def verify_password(plain_password: str, hashed_password: str) -> bool:
|
||||
|
||||
|
||||
def get_password_hash(password: str) -> str:
|
||||
if len(password.encode('utf-8')) > 72:
|
||||
password = password[:72]
|
||||
return pwd_context.hash(password)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user