Handle missing separator in query string parser

This commit is contained in:
AsamK 2022-11-02 23:16:38 +01:00
parent 36abb8ae8f
commit 1d98e5307a

View file

@ -123,7 +123,7 @@ public class Utils {
for (var param : params) {
final var paramParts = param.split("=");
var name = URLDecoder.decode(paramParts[0], StandardCharsets.UTF_8);
var value = URLDecoder.decode(paramParts[1], StandardCharsets.UTF_8);
var value = paramParts.length == 1 ? null : URLDecoder.decode(paramParts[1], StandardCharsets.UTF_8);
map.put(name, value);
}
return map;