You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by pa...@apache.org on 2020/05/05 09:26:53 UTC

[ofbiz-framework] branch trunk updated: Fixed: Issue with opening a page via bookmark when the user is logged out (OFBIZ-10539)

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

pawan 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 e925e5f  Fixed: Issue with opening a page via bookmark when the user is logged out (OFBIZ-10539)
e925e5f is described below

commit e925e5f1df5424e9e1125f5192ce57c02bc93678
Author: Pawan Verma <pa...@hotwaxsystems.com>
AuthorDate: Tue May 5 14:56:25 2020 +0530

    Fixed: Issue with opening a page via bookmark when the user is logged out
    (OFBIZ-10539)
    
    Thanks: Ritesh Kumar for report and the patch and Girish for the review.
---
 .../src/main/java/org/apache/ofbiz/base/util/UtilHttp.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
index 68b8b6b..419e9ba 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
@@ -331,6 +331,18 @@ public final class UtilHttp {
                 if (equalsIndex > 0) {
                     String name = token.substring(0, equalsIndex);
                     paramMap.put(name, token.substring(equalsIndex + 1));
+                    String paramValue = UtilCodec.getDecoder("url").decode(token.substring(equalsIndex + 1));
+                    if (UtilValidate.isEmpty(paramMap.get(name))) {
+                        paramMap.put(name, paramValue);
+                    } else {
+                        if (paramMap.get(name) instanceof Collection<?>){
+                            List<String> valueList  = UtilGenerics.cast(paramMap.get(name));
+                            valueList.add(paramValue);
+                            paramMap.put(name, valueList);
+                        } else {
+                            paramMap.put(name, UtilMisc.toList(paramMap.get(name), paramValue));
+                        }
+                    }
                 }
             }
         }