ashb commented on code in PR #49013:
URL: https://github.com/apache/airflow/pull/49013#discussion_r2035752556


##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -329,14 +329,23 @@ def _requires_access(
         raise HTTPException(status.HTTP_403_FORBIDDEN, "Forbidden")
 
 
-def is_safe_url(target_url: str) -> bool:
+def is_safe_url(target_url: str, request: Request | None = None) -> bool:
     """
     Check that the URL is safe.
 
     Needs to belong to the same domain as base_url, use HTTP or HTTPS (no 
JavaScript/data schemes),
     is a valid normalized path.
     """
-    base_url = conf.get("api", "base_url")
+    base_url: str | None = conf.get("api", "base_url")

Review Comment:
   The way the config is defined it's impossible for this to ever actually be 
None btw -- it's got a default value, so the only way of overriding it would be 
to an empty string



-- 
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]

Reply via email to