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 db157a6d26..ca96be12e6 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 @@ -142,7 +142,9 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha String queryString = httpRequest.getQueryString(); if (queryString != null) { queryString = URLDecoder.decode(queryString, "UTF-8"); - if (UtilValidate.isUrl(queryString) || !SecuredUpload.isValidText(queryString, Collections.emptyList())) { + if (UtilValidate.isUrl(queryString) + || (!SecuredUpload.isValidText(queryString, Collections.emptyList()) + && !queryString.contains("JavaScriptEnabled=Y"))) { Debug.logError("For security reason this URL is not accepted", module); throw new RuntimeException("For security reason this URL is not accepted"); }