Restrict MSGraph pagination nextLink to the configured host#69742
Conversation
Signed-off-by: bibi samina <sam@bugqore.com>
|
@Samin061 — Some review feedback from Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
Signed-off-by: bibi samina <sam@bugqore.com>
|
Pushed the refactor: allowed_netloc is resolved once from the request adapter's base_url in get_async_conn and stored on self (init to None in init), so there are no per-run connection lookups anymore. Also updated the adapter mocks in the tests that go through get_async_conn to carry a real base_url. All threads addressed and resolved. @dabla ready for another look when you have a moment. |
|
Well done @Samin061 , the PR has been merged! |
|
thankyou @dabla for taking time to review, will be looking forward to work more on this repo . thanks againn |
…9742) * restrict msgraph pagination nextLink to the configured host * Compute pagination host check inside the run loop * Resolve pagination host once when building the request adapter Signed-off-by: bibi samina <sam@bugqore.com> --------- Signed-off-by: bibi samina <sam@bugqore.com> Co-authored-by: David Blain <info@dabla.be>
paginated_run follows the @odata.nextLink from each Microsoft Graph response and refetches it with the connection's bearer token attached, while Kiota's allowed_hosts defaults to empty (any host) when no authority is set, so a tampered response can send the token to an arbitrary host. Pin follow-up pagination requests to the configured endpoint's host and refuse a nextLink that points elsewhere.