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.
This commit is contained in:
Pawan Verma
2020-05-05 14:58:58 +05:30
parent 95a65c3dd2
commit 4cd701023c
@@ -305,6 +305,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));
}
}
}
}
}