Skip to content

Commit 871ce2a

Browse files
committed
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: <<Unfortunately, the stream was empty / not available. This may be caused by another servlet filter calling ServletRequest.getParameter*() before SolrDispatchFilter>> Conflicts handled by hand
1 parent b24dcff commit 871ce2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/ControlFilter.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
135135
offset = requestUri.length();
136136
}
137137
if (!GenericValue.getStackTraceAsString().contains("ControlFilterTests")
138-
&& !System.getProperty("java.class.path").contains("--test component=solr") // Allows Solr tests
138+
&& !(System.getProperty("java.class.path").contains("--test component=solr") // Allows Solr tests
139+
|| System.getProperty("java.class.path").contains("ofbiz --test_ManifestJar.jar") // Allows Solr tests in testIntegration
140+
|| System.getProperty("java.class.path").contains("ofbiz.jar")) // Allows Solr tests in testIntegration in 18.12
139141
&& SecurityUtil.containsFreemarkerInterpolation(httpRequest, httpResponse, requestUri)) {
140142
return;
141143
}

0 commit comments

Comments
 (0)