Skip to content

Commit 529f314

Browse files
authored
重要更新,修复后台密码验证问题
1 parent abe7581 commit 529f314

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/admin/dependencies.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
async def admin_required(authorization: str = Header(default=None), request: Request = None):
12-
is_admin = authorization.split(' ')[-1] if authorization else '' == str(settings.admin_token)
12+
is_admin = (authorization.split(' ')[-1] if authorization else '') == settings.admin_token
1313
if request.url.path.startswith('/share/'):
1414
if not settings.openUpload and not is_admin:
1515
raise HTTPException(status_code=403, detail='本站未开启游客上传,如需上传请先登录后台')

0 commit comments

Comments
 (0)