dpgaspar commented on code in PR #23217: URL: https://github.com/apache/superset/pull/23217#discussion_r1119747279
########## superset/db_engine_specs/base.py: ########## @@ -1724,6 +1726,18 @@ def get_public_information(cls) -> Dict[str, Any]: "disable_ssh_tunneling": cls.disable_ssh_tunneling, } + @classmethod + def validate_database_uri(cls, sqlalchemy_uri: URL) -> None: + """ + Validates a database SQLAlchemy URI per engine spec. + Use this to implement a final validation for unwanted connection configuration + + :param sqlalchemy_uri: + """ + for query_param in sqlalchemy_uri.query.keys(): + if query_param in cls.disallow_uri_query_params: + raise ValueError("Disallowed query parameter") Review Comment: nice! -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org