From 1d98e5307ad42052b1463df1f7f3744828a04c5a Mon Sep 17 00:00:00 2001 From: AsamK Date: Wed, 2 Nov 2022 23:16:38 +0100 Subject: [PATCH] Handle missing separator in query string parser --- lib/src/main/java/org/asamk/signal/manager/util/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/util/Utils.java b/lib/src/main/java/org/asamk/signal/manager/util/Utils.java index 4be7c39a..792a107d 100644 --- a/lib/src/main/java/org/asamk/signal/manager/util/Utils.java +++ b/lib/src/main/java/org/asamk/signal/manager/util/Utils.java @@ -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;