pomegranited commented on code in PR #31692:
URL: https://github.com/apache/superset/pull/31692#discussion_r2023821560


##########
superset/utils/urls.py:
##########
@@ -62,3 +62,20 @@ def is_secure_url(url: str) -> bool:
     """
     parsed_url = urlparse(url)
     return parsed_url.scheme == "https"
+
+
+def is_safe_redirect_url(source_url: str, target_url: str) -> bool:

Review Comment:
   Ok, I've found what we needed in FAB: 
[get_safe_redirect](https://github.com/dpgaspar/Flask-AppBuilder/blob/6d44e6d581433dcea475764c4bb1270c24bbd6de/flask_appbuilder/utils/base.py#L36).
 My only worry is it's not exposed as an explicit part of the API, and so might 
change out from under us. But it's used in several places in the FAB code base, 
so it's a calculated risk.



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

Reply via email to