From 478987a3693fcfed653ab6550dde27fcd9c88007 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Sun, 2 May 2021 15:56:38 +0200 Subject: [PATCH] don't deploy admin when not enabled LDEV-3343 https://luceeserver.atlassian.net/browse/LDEV-3343 --- .../java/lucee/runtime/config/ConfigWebFactory.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java index b26b7d4fda..db4a322229 100755 --- a/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java +++ b/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java @@ -1231,10 +1231,12 @@ private static void createContextFiles(Resource configDir, ServletConfig servlet if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-context.lar", f); else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-context.lar", f); - // lucee-admin - f = contextDir.getRealResource("lucee-admin.lar"); - if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f); - else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f); + // lucee-admin (only deploy if enabled) + if (Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.admin.enabled", "true"), true)) { + f = contextDir.getRealResource("lucee-admin.lar"); + if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f); + else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f); + } // lucee-doc f = contextDir.getRealResource("lucee-doc.lar");