fix: C3 case-insensitive Bearer prefix + S1 MCP asyncio.Lock (closes 2 xfail)
tests / pytest (push) Has been cancelled
tests / pytest (push) Has been cancelled
This commit is contained in:
@@ -15,7 +15,12 @@ async def get_current_user(
|
||||
if not authorization:
|
||||
raise HTTPException(status_code=401, detail="Missing Authorization header")
|
||||
|
||||
token = authorization.replace("Bearer ", "").strip()
|
||||
# Case-insensitive Bearer prefix handling (C3)
|
||||
auth_value = authorization.strip()
|
||||
if auth_value.lower().startswith("bearer "):
|
||||
token = auth_value[7:].strip()
|
||||
else:
|
||||
token = auth_value
|
||||
|
||||
# Static-Auth-Token als Master-Key (für Setup/Bootstrap)
|
||||
if token == settings.AUTH_TOKEN:
|
||||
|
||||
Reference in New Issue
Block a user