Skip to content

Commit

Permalink
重要更新,修复后台密码验证问题
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa authored Nov 24, 2024
1 parent abe7581 commit 529f314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/admin/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


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

0 comments on commit 529f314

Please sign in to comment.