aminghadersohi commented on code in PR #45766:
URL: https://github.com/apache/superset/pull/45766#discussion_r4393933259
##########
tests/unit_tests/db_engine_specs/test_impala.py:
##########
@@ -62,8 +62,8 @@ def test_get_cancel_query_id() -> None:
@patch("superset.db_engine_specs.impala.is_safe_host", return_value=True)
-@patch("requests.post")
-def test_cancel_query(post_mock: Mock, _safe_host: Mock) -> None: # noqa:
PT019
+@patch("superset.db_engine_specs.impala.get_ssrf_safe_requester")
Review Comment:
This mock never checks allow_unsafe_hosts, so the default cancellation path
can disable peer validation without failing the test. No suggestion: the
assertion belongs after cancel_query, an unchanged context line.
##########
superset/reports/notifications/webhook.py:
##########
@@ -291,7 +202,11 @@ def send(self) -> None:
payload = self._get_req_payload()
files = self._get_files()
timeout = current_app.config["ALERT_REPORTS_WEBHOOK_TIMEOUT"]
- requester = _get_requester()
+ requester = get_ssrf_safe_requester(
Review Comment:
Existing webhooks that rely on environment proxies, CA bundles or .netrc
stop working because this helper sets trust_env=False. Add an upgrade note
explaining the behavior and opt-out, or preserve the non-proxy settings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]