Fixed: Issue with opening a page via bookmark when the user is logged out
Thanks: Ritesh Kumar for report and the patch and Girish for the review.
@@ -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));
+ }
+ }
}
}
}
