You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/04/21 14:20:12 UTC

[GitHub] [superset] villebro commented on a diff in pull request #23769: fix: allow db driver distinction on enforced URI params

villebro commented on code in PR #23769:
URL: https://github.com/apache/superset/pull/23769#discussion_r1173826620


##########
superset/db_engine_specs/mysql.py:
##########
@@ -175,8 +175,14 @@ class MySQLEngineSpec(BaseEngineSpec, BasicParametersMixin):
             {},
         ),
     }
-    disallow_uri_query_params = {"local_infile"}
-    enforce_uri_query_params = {"local_infile": 0}
+    disallow_uri_query_params = {
+        "mysqldb": {"local_infile"},
+        "mysqlconnector": {"allow_local_infile"},
+    }
+    enforce_uri_query_params = {
+        "mysqldb": {"local_infile": 0},
+        "mysqlconnector": {"allow_local_infile": 0},
+    }

Review Comment:
   thinking out loud: would it be convenient to be able to specify globally disallowed params, too? Something like this:
   ```python
       disallow_uri_query_params = {
           "": {"my_globally_disallowed_param"},
           "mysqldb": {"local_infile"},
           "mysqlconnector": {"allow_local_infile"},
       }
   ```
   (feel free to ignore this idea, as it looks pretty awful 😆)



-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org