From 86c339f163f652bf05c9deb6e1642f8a5a039203 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Wed, 11 Sep 2024 10:42:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-134200=20=E3=80=90fr-fbp=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=E3=80=91=E5=BB=BA=E7=AB=8Bhsql=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=A9=B1=E5=8A=A8=E7=9A=84=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/preview/ConnectionInfoBeanHelper.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java index 26ae869fcd..33e085beb3 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/ConnectionInfoBeanHelper.java @@ -157,7 +157,7 @@ public class ConnectionInfoBeanHelper { .user(jdbcConnection.getUser()) .driver(jdbcConnection.getDriver()) // 关键中的关键,由设计器发出的请求如果要携带密码,不能传明文,必须必须必须传加密后的密码 - .password(withPassword ? encrypt(jdbcConnection.getPassword()) : DecisionServiceConstants.DEFAULT_PASSWORD) + .password(withPassword ? DataEncryptionHelper.encrypt(jdbcConnection.getPassword()) : DecisionServiceConstants.DEFAULT_PASSWORD) .schema(jdbcConnection.getSchema()) .url(jdbcConnection.getURL()) .creator(jdbcConnection.getCreator()) @@ -188,14 +188,6 @@ public class ConnectionInfoBeanHelper { .verifyCa(jdbcConnection.getSsl().getSslType() == SslType.NORMAL && ((NormalSsl) jdbcConnection.getSsl()).isVerifyCa()); } - private static String encrypt(String password) { - // 如果是空密码或者默认密码,就返回默认的星号回去 - if (StringUtils.isEmpty(password) || StringUtils.equals(password, DecisionServiceConstants.DEFAULT_PASSWORD)) { - return DecisionServiceConstants.DEFAULT_PASSWORD; - } - return TransmissionEncryptionManager.getInstance().getEncryption(WorkplaceConstants.getEncryptionMode()).encrypt(password, WorkplaceConstants.getEncryptionKey()); - } - private static Connection createJDBCConnection(ConnectionInfoBean connectionInfoBean) throws Exception { String name = connectionInfoBean.getConnectionName();