From 54649c5061a1c6b6440b75ba7b724ea1e30a72b2 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Tue, 13 Jun 2023 17:39:30 +0200 Subject: [PATCH] LDEV-4540 - change the approach for setting implicit value --- core/src/main/java/lucee/commons/sql/SQLUtil.java | 8 +++++--- loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/lucee/commons/sql/SQLUtil.java b/core/src/main/java/lucee/commons/sql/SQLUtil.java index 158e3ea58b..4baa7afdba 100644 --- a/core/src/main/java/lucee/commons/sql/SQLUtil.java +++ b/core/src/main/java/lucee/commons/sql/SQLUtil.java @@ -229,11 +229,13 @@ public static String connectionStringTranslatedPatch(Config config, String connS // MSSQL if (StringUtil.startsWithIgnoreCase(connStr, "jdbc:sqlserver://")) { - if (StringUtil.indexOfIgnoreCase(connStr, ";encrypt=") != -1) { + if (StringUtil.indexOfIgnoreCase(connStr, ";trustServerCertificate=") != -1) { return connStr; } - return connStr + ";encrypt=false"; // we want default behaviour to state as before, if someone whishes encryption it can be set - // explicitly as the default behaviour was before + return connStr + (StringUtil.isEmpty(connStr, true) || connStr.endsWith(";") ? "" : ";") + "trustServerCertificate=true"; // we want default behaviour to state as + // before, if someone + // whishes encryption it can be set + // explicitly as the default behaviour was before } return connStr; diff --git a/loader/build.xml b/loader/build.xml index 36c3a6c3d2..50111617aa 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 9f181ab0e0..87e09918bd 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 5.4.0.79-SNAPSHOT + 5.4.0.80-SNAPSHOT jar Lucee Loader Build