You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "peacewong (via GitHub)" <gi...@apache.org> on 2023/03/26 08:46:05 UTC

[GitHub] [linkis] peacewong commented on a diff in pull request #4412: update jdbc connect logic

peacewong commented on code in PR #4412:
URL: https://github.com/apache/linkis/pull/4412#discussion_r1148506647


##########
linkis-commons/linkis-common/src/main/java/org/apache/linkis/common/utils/SecurityUtils.java:
##########
@@ -46,25 +47,112 @@ public abstract class SecurityUtils {
 
   private static final String QUESTION_MARK = "?";
 
+  private static final String REGEX_QUESTION_MARK = "\\?";
+
+  private static final int JDBC_URL_ITEM_COUNT = 2;
+
   /** allowLoadLocalInfile,allowLoadLocalInfiled,# */
-  public static final CommonVars<String> MYSQL_SENSITIVE_PARAMS =
+  private static final CommonVars<String> MYSQL_SENSITIVE_PARAMS =
       CommonVars$.MODULE$.apply(
           "linkis.mysql.sensitive.params",
           "allowLoadLocalInfile,autoDeserialize,allowLocalInfile,allowUrlInLocalInfile,#");
 
   /**
    * "allowLoadLocalInfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false"
    */
-  public static final CommonVars<String> MYSQL_FORCE_PARAMS =
+  private static final CommonVars<String> MYSQL_FORCE_PARAMS =
       CommonVars$.MODULE$.apply(
           "linkis.mysql.force.params",
           "allowLoadLocalInfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false");
 
-  public static final CommonVars<String> MYSQL_STRONG_SECURITY_ENABLE =
+  private static final CommonVars<String> MYSQL_STRONG_SECURITY_ENABLE =
       CommonVars$.MODULE$.apply("linkis.mysql.strong.security.enable", "false");
 
+  private static final CommonVars<String> MYSQL_CONNECT_URL =
+      CommonVars.apply("wds.linkis.server.mdm.service.sql.url", "jdbc:mysql://%s:%s/%s");

Review Comment:
   remove wds and rename linkis.security.mysql.url.regex



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

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


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