add:解决select可跳过次数限制,新增sha256加密token,限制取件码+ip+时间999s内取件

This commit is contained in:
lan
2023-02-09 14:22:56 +08:00
parent 14944c06f0
commit f72e121406
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -47,4 +47,4 @@ async def get_code(s: AsyncSession):
async def get_token(ip, code):
return hashlib.sha256(f"{ip}{code}{int(time.time()) / 1000}000{settings.SECRET_KEY}".encode()).hexdigest()
return hashlib.sha256(f"{ip}{code}{int(time.time() / 1000)}000{settings.ADMIN_PASSWORD}".encode()).hexdigest()