You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/06/14 16:56:02 UTC

[GitHub] [superset] betodealmeida commented on a change in pull request #15151: feat: adding server-side validation and unmasked password on create

betodealmeida commented on a change in pull request #15151:
URL: https://github.com/apache/superset/pull/15151#discussion_r651118522



##########
File path: superset/db_engine_specs/base.py
##########
@@ -1438,7 +1438,7 @@ def validate_parameters(
             return errors
 
         port = parameters.get("port", None)
-        if not port:
+        if not port or type(port) is str:

Review comment:
       What happens today if we pass a string as the port?
   
   The proper way to handle validation would be adding to the Marshmallow schema, and we're already enforcing that it should be an int: https://github.com/apache/superset/blob/a241e318c6c1dfa94897858d7a2db4e7aa0247f3/superset/db_engine_specs/base.py#L1310




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

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