From 871ce2aa2e9efb63ba4e97d4a06f1c6664a81a9d Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Wed, 6 Apr 2022 10:59:56 +0200 Subject: [PATCH] Fixed: Prevent Freemarker interpolation in fields (OFBIZ-12594) I did not catch an issue put in by this feature because BuildBot is not running for few days (see INFRA-23076) and i don't always run tests locally (relying on BuildBot and GH actions don't run tests). This is the error Solr tests throw else: <> Conflicts handled by hand --- .../java/org/apache/ofbiz/webapp/control/ControlFilter.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlFilter.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlFilter.java index 9da445c3ad..ad8b351cfe 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlFilter.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlFilter.java @@ -135,7 +135,9 @@ public class ControlFilter implements Filter { offset = requestUri.length(); } if (!GenericValue.getStackTraceAsString().contains("ControlFilterTests") - && !System.getProperty("java.class.path").contains("--test component=solr") // Allows Solr tests + && !(System.getProperty("java.class.path").contains("--test component=solr") // Allows Solr tests + || System.getProperty("java.class.path").contains("ofbiz --test_ManifestJar.jar") // Allows Solr tests in testIntegration + || System.getProperty("java.class.path").contains("ofbiz.jar")) // Allows Solr tests in testIntegration in 18.12 && SecurityUtil.containsFreemarkerInterpolation(httpRequest, httpResponse, requestUri)) { return; }