Unverified Commit 5c5bde3b authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge pull request #451 from goecho/main

Fix bug: Header attributes (Host, Authorization, Origin, Referer) not sanitized.
parents b1f29aac 74f91bc7
...@@ -65,10 +65,10 @@ async def proxy(path: str, request: Request, user=Depends(get_current_user)): ...@@ -65,10 +65,10 @@ async def proxy(path: str, request: Request, user=Depends(get_current_user)):
else: else:
raise HTTPException(status_code=401, detail=ERROR_MESSAGES.ACCESS_PROHIBITED) raise HTTPException(status_code=401, detail=ERROR_MESSAGES.ACCESS_PROHIBITED)
headers.pop("Host", None) headers.pop("host", None)
headers.pop("Authorization", None) headers.pop("authorization", None)
headers.pop("Origin", None) headers.pop("origin", None)
headers.pop("Referer", None) headers.pop("referer", None)
r = None r = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment