From 992d690ffc05150a5848617d0e8d4604bc9f3afe Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 10 Sep 2024 13:15:45 +0200 Subject: [PATCH] SEBSP-163 removed wrong replacements of + with %2b in URL encoded strings --- src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java index 03b604b2..93319262 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java +++ b/src/main/java/ch/ethz/seb/sebserver/gbl/util/Utils.java @@ -411,11 +411,7 @@ public final class Utils { return value; } - return URLDecoder.decode( - (value.indexOf('+') >= 0) - ? value.replaceAll("\\+", "%2b") - : value, - StandardCharsets.UTF_8); + return URLDecoder.decode(value, StandardCharsets.UTF_8); } public static void clearCharArray(final char[] array) {