mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-11-18 02:53:17 +01:00
enhance security by adding cache control headers, validating password length, and rejecting encoded slashes in path processing
This commit is contained in:
@@ -57,6 +57,7 @@ async def auth_check(request: Request):
|
||||
return re.sub(r"[\r\n\x00]", "", value)
|
||||
|
||||
response = PlainTextResponse("OK", status_code=200)
|
||||
response.headers["Cache-Control"] = "no-store"
|
||||
if session:
|
||||
if session.username:
|
||||
response.headers["X-Auth-User"] = _safe_header(session.username)
|
||||
|
||||
Reference in New Issue
Block a user