check it's a user before comparing username

This commit is contained in:
Min RK
2025-08-13 08:30:22 -07:00
committed by GitHub
parent 2079d1e7c4
commit 20895dba83

View File

@@ -1330,7 +1330,7 @@ class BaseHandler(RequestHandler):
if self.authenticator.refresh_pre_stop:
auth_user = await self.refresh_auth(user, force=True)
if auth_user is None:
if self.current_user.name == user.name:
if self.current_user.kind == "user" and self.current_user.name == user.name:
raise web.HTTPError(
403, "auth has expired for %s, login again", user.name
)