From f9cef41fcf7c72ef20ada2dba76df63f5f514553 Mon Sep 17 00:00:00 2001 From: GloRRian55 Date: Tue, 10 Dec 2024 18:06:37 +0300 Subject: [PATCH] CR --- .../main/java/io/micronaut/http/form/FormConfiguration.java | 4 +++- .../io/micronaut/http/uri/DefaultFormUrlEncodedDecoder.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/http/src/main/java/io/micronaut/http/form/FormConfiguration.java b/http/src/main/java/io/micronaut/http/form/FormConfiguration.java index d7c6cc2ebc..0538af5c02 100644 --- a/http/src/main/java/io/micronaut/http/form/FormConfiguration.java +++ b/http/src/main/java/io/micronaut/http/form/FormConfiguration.java @@ -30,6 +30,8 @@ public interface FormConfiguration { /** * @return true if the semicolon handle as a normal character, false otherwise. */ - boolean isSemicolonIsNormalChar(); + default boolean isSemicolonIsNormalChar() { + return false; + } } diff --git a/http/src/main/java/io/micronaut/http/uri/DefaultFormUrlEncodedDecoder.java b/http/src/main/java/io/micronaut/http/uri/DefaultFormUrlEncodedDecoder.java index 876de83ec0..2875ab3e7b 100644 --- a/http/src/main/java/io/micronaut/http/uri/DefaultFormUrlEncodedDecoder.java +++ b/http/src/main/java/io/micronaut/http/uri/DefaultFormUrlEncodedDecoder.java @@ -36,7 +36,9 @@ final class DefaultFormUrlEncodedDecoder implements FormUrlEncodedDecoder { @NonNull public Map decode(@NonNull String formUrlEncodedString, @NonNull Charset charset) { - QueryStringDecoder decoder = new QueryStringDecoder(formUrlEncodedString, charset, false, formConfiguration.getMaxDecodedKeyValueParameters()); + QueryStringDecoder decoder = new QueryStringDecoder(formUrlEncodedString, charset, false, + formConfiguration.getMaxDecodedKeyValueParameters(), + formConfiguration.isSemicolonIsNormalChar()); return flatten(decoder.parameters()); } }