From acf13e9dd842e957c5a955d7227af5d714704566 Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Mon, 12 Apr 2021 16:59:31 +0530 Subject: [PATCH] Bug fix: import password.txt even if hspw="" for LDEV-3439 --- core/src/main/java/lucee/runtime/config/ConfigWebFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java index 58ba4c054c..371cda4801 100755 --- a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java +++ b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java @@ -572,8 +572,8 @@ private static boolean createSaltAndPW(Struct root, Config config) { } // no password yet - if (config instanceof ConfigServer && !root.containsKey("hspw") && !root.containsKey("adminhspw") && !root.containsKey("pw") && !root.containsKey("adminpw") - && !root.containsKey("password") && !root.containsKey("adminpassword")) { + if (config instanceof ConfigServer && StringUtil.isEmpty(root.get("hspw",""), true) && StringUtil.isEmpty(root.get("adminhspw",""), true) && StringUtil.isEmpty(root.get("pw",""), true) && StringUtil.isEmpty(root.get("adminpw",""), true) + && StringUtil.isEmpty(root.get("password",""), true) && StringUtil.isEmpty(root.get("adminpassword",""), true)) { ConfigServer cs = (ConfigServer) config; Resource pwFile = cs.getConfigDir().getRealResource("password.txt"); if (pwFile.isFile()) {