WSH032 / fastapi-proxy-lib

HTTP/WebSocket proxy for starlette/FastAPI
https://wsh032.github.io/fastapi-proxy-lib/
Apache License 2.0
25 stars 4 forks source link

fix(security): fix cookies leakage between different users #10

Closed WSH032 closed 9 months ago

WSH032 commented 9 months ago

Summary

Through this PR, fastapi-proxy-lib takes over the AsyncClient cookies argument.

For example, the following do not work anymore.

ForwardHttpProxy(AsyncClient(cookies={"foo": "bar"}))

But normal cookie sending and receiving are not affected.

Security-advisories: GHSA-7vwr-g6pm-9hc8

Checklist

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (5836696) 96.71% compared to head (305a2ca) 96.74%. Report is 9 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #10 +/- ## ========================================== + Coverage 96.71% 96.74% +0.02% ========================================== Files 9 9 Lines 457 461 +4 Branches 66 67 +1 ========================================== + Hits 442 446 +4 Misses 9 9 Partials 6 6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.