From e438dc132a22d5efd8af2469d7c4140d29b3c596 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 15 Jun 2023 10:38:32 +0800 Subject: [PATCH] bugfix --- ahserver/auth_api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ahserver/auth_api.py b/ahserver/auth_api.py index 77408a6..71cfc0b 100755 --- a/ahserver/auth_api.py +++ b/ahserver/auth_api.py @@ -60,6 +60,8 @@ class AuthAPI(AppLogger): print(f'**{user=}, {path} access **') return await handler(request) print(f'**{user=}, {path} forbidden**') + if user is None: + raise web.HTTPUnauthorized raise web.HTTPForbidden() async def checkUserPermission(self, user, path):