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

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

commit 33fe2aaba5eca5a5de21728c1f80bfc92597f54b
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sun Mar 6 09:30:30 2022 +0100

    Fixed: Remove _PREVIOUS_REQUEST_ Session Attribute on non-authentication 
pages (OFBIZ-12047)
    
    Demo content website cmssite/cms could not be accessed because in this case
    requestUri is null. Like login request it does not need auth, I did not dig
    further, here is a simple fix.
---
 .../src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
index 05fa98a..877a5de 100644
--- 
a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
+++ 
b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
@@ -629,7 +629,7 @@ public final class RequestHandler {
                     requestMap = ccfg.getRequestMapMap().get("ajaxCheckLogin");
                 }
             }
-        } else {
+        } else if (requestUri != null) {
             String[] loginUris = 
EntityUtilProperties.getPropertyValue("security", "login.uris", 
delegator).split(",");
             boolean removePreviousRequest = true;
             for (int i = 0; i < loginUris.length; i++) {

Reply via email to