Skip to content

Commit

Permalink
Fixed: Prevent Freemarker interpolation in fields (OFBIZ-12594)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JacquesLeRoux committed Apr 6, 2022
1 parent 9a6b54a commit b24dcff
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
offset = requestUri.length();
}
if (!GenericValue.getStackTraceAsString().contains("ControlFilterTests")
&& !System.getProperty("java.class.path").contains("--test component=solr") // Allows Solr tests
&& SecurityUtil.containsFreemarkerInterpolation(httpRequest, httpResponse, requestUri)) {
return;
}
Expand Down

0 comments on commit b24dcff

Please sign in to comment.