Uh oh!
There was an error while loading. Please reload this page.
service: guard against cross-origin __next URL redirection - #308
Conversation
phanak-sap
commented
Jul 9, 2026
Build will currently fail because PR #307 not yet merged. Important should be passing of both newly added tests (passing localy)
|
filak-sap
left a comment
There was a problem hiding this comment.
Just do not open PRs if you know that tests are failing and another fixing the tests is pending please! Now merge the tests fixing PR and rebase this one.
OData servers can legitimately paginate across path segments, but the __next value is server-controlled and untrusted. Validate that its origin (scheme + host + port) matches the configured service root before dispatching, so session-level credentials are never forwarded to a host the application did not configure. Raises PyODataException on mismatch. Fix is applied in ODataHttpRequest._build_request(), the single point both execute() (sync) and async_execute() (async) pass through, so one check covers all dispatch paths. Depends on stdlib urllib.parse only, keeping pyodata networking-library agnostic.
phanak-sap
commented
Jul 10, 2026
sure, that was indeed the intended path forward for me. |
Uh oh!
There was an error while loading. Please reload this page.
OData servers can legitimately paginate across path segments, but the
__next value is server-controlled and untrusted. Validate that its origin
(scheme + host + port) matches the configured service root before
dispatching, so session-level credentials are never forwarded to a host
the application did not configure. Raises PyODataException on mismatch.
Fix is applied in ODataHttpRequest._build_request(), the single point
both execute() (sync) and async_execute() (async) pass through, so one
check covers all dispatch paths. Depends on stdlib urllib.parse only,
keeping pyodata networking-library agnostic.