Commit bbdb3898 authored by lcn's avatar lcn

兼容

parent 0c4d5d12
......@@ -24,7 +24,11 @@ async def auth_phone_verify(phone, verify):
verify_server = await RedisUtils().get(f"sms:sms_{phone}")
log.info(f"auth_phone_verify phone:{phone}, verify_server:{verify_server},"
f"verify:{verify}")
if not verify_server or verify != verify_server.decode():
if not verify_server:
return False
if isinstance(verify_server, str) and verify != verify_server:
return False
if isinstance(verify_server, bytes) and verify != verify_server.decode():
return False
return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment