From f0bcd923dca06cdadacbd6abb38e91d341e54af5 Mon Sep 17 00:00:00 2001 From: Julien Giovaresco Date: Wed, 26 Jul 2023 09:01:41 +0200 Subject: [PATCH] fix: decrease the nested object limit to 100 instead of 1000 --- README.adoc | 2 +- .../io/gravitee/policy/json2xml/transformer/JSONTokener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 705fa50..4eb2304 100644 --- a/README.adoc +++ b/README.adoc @@ -68,4 +68,4 @@ You can configure the policy with the following options: === Nested objects -To limit the processing time in case of nested object, a default max depth of nested object has been defined to 1000. This default value can be overriden using the environment variable `gravitee_policy_jsonxml_maxdepth`. \ No newline at end of file +To limit the processing time in case of nested object, a default max depth of nested object has been defined to 100. This default value can be overriden using the environment variable `gravitee_policy_jsonxml_maxdepth`. diff --git a/src/main/java/io/gravitee/policy/json2xml/transformer/JSONTokener.java b/src/main/java/io/gravitee/policy/json2xml/transformer/JSONTokener.java index 7920a80..191cfd0 100644 --- a/src/main/java/io/gravitee/policy/json2xml/transformer/JSONTokener.java +++ b/src/main/java/io/gravitee/policy/json2xml/transformer/JSONTokener.java @@ -58,7 +58,7 @@ of this software and associated documentation files (the "Software"), to deal */ public class JSONTokener { - public static final int DEFAULT_MAX_DEPTH = 1000; + public static final int DEFAULT_MAX_DEPTH = 100; private long character; private boolean eof; private long index;