fix: reject invalid readiness user payload (#77)
This commit is contained in:
1 parent
b2f8eaf89a
commit
090a059c17
2 files changed
+19
No files matched your search
@@ -43,6 +43,8 @@ async def readiness():
|
||||
user = await asyncio.wait_for(
|
||||
current_user(), timeout=READINESS_TIMEOUT_SECONDS
|
||||
)
|
||||
if not isinstance(user, dict) or not user.get("login"):
|
||||
raise ValueError("Gitea current-user response did not include a login")
|
||||
except Exception as exc:
|
||||
timed_out = isinstance(exc, TimeoutError)
|
||||
error_message = (
|
||||
|
||||
Reference in new issue
Block a user