This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1cfef45f89 Improved: Move solr component to Attic (OFBIZ-13220)
1cfef45f89 is described below

commit 1cfef45f89d2714fef1a94729fa48f554be75c6e
Author: Nicolas Malin <nicolas.ma...@nereide.fr>
AuthorDate: Mon Apr 14 16:37:28 2025 +0200

    Improved: Move solr component to Attic (OFBIZ-13220)
    
    After move solr plugin to Attic, we remove dependency code present on 
framework
---
 .../java/org/apache/ofbiz/webapp/control/ControlFilter.java | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

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 65607fc673..f5e9a69577 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
@@ -62,7 +62,7 @@ import org.apache.ofbiz.security.SecuredUpload;
  *     non matching request paths are redirected, or an error code is returned,
  *     according to the setup of redirectPath and errorCode
  *   - redirectPath: if the path requested is not in the allowedPaths, or 
forceRedirectAll is set to Y,
- *     specifies the the path to which the request is redirected to;
+ *     specifies the path to which the request is redirected to;
  *   - errorCode: the error code set in the response if the path requested is 
not in the allowedPaths
  *     and redirectPath is not set; defaults to 403
  *
@@ -135,13 +135,6 @@ public class ControlFilter extends HttpFilter {
                                : 
Arrays.stream(paths.split(":")).collect(Collectors.toSet());
     }
 
-    /**
-     * Allows Solr tests
-     */
-    private static boolean isSolrTest() {
-        return null != System.getProperty("SolrDispatchFilter");
-    }
-
     /**
      * Sends an HTTP response redirecting to {@code redirectPath}.
      * @param resp The response to send
@@ -187,10 +180,10 @@ public class ControlFilter extends HttpFilter {
 
             //// Block with several steps for rejecting wrong URLs, allowing 
specific ones
 
-            // Allows UEL and FlexibleString (OFBIZ-12602). Also allows 
SolrTest to pass. No need to check these URLs
+            // Allows UEL and FlexibleString (OFBIZ-12602).
             GenericValue userLogin = (GenericValue) 
session.getAttribute("userLogin");
             if (!LoginWorker.hasBasePermission(userLogin, req)) { // Allows 
UEL and FlexibleString (OFBIZ-12602)
-                if (isSolrTest() && 
SecuredFreemarker.containsFreemarkerInterpolation(req, resp, uri)) { // Reject 
Freemarker interpolation in URL
+                if (SecuredFreemarker.containsFreemarkerInterpolation(req, 
resp, uri)) { // Reject Freemarker interpolation in URL
                     return;
                 }
             }

Reply via email to