Skip to content

Commit f543757

Browse files
Merge branch 'master' into ft/add-documentation-for-safe-url-resolver
2 parents 2e45c88 + ba13af5 commit f543757

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/swagger-parser-v3/src/main/java/io/swagger/v3/parser/util/DeserializationUtils.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ public static LoaderOptions buildLoaderOptions() {
201201
method.invoke(loaderOptions, options.getMaxYamlAliasesForCollections());
202202
method = LoaderOptions.class.getMethod("setAllowRecursiveKeys", boolean.class);
203203
method.invoke(loaderOptions, options.isYamlAllowRecursiveKeys());
204+
method = LoaderOptions.class.getMethod("setAllowDuplicateKeys", boolean.class);
205+
method.invoke(loaderOptions, false);
206+
method = LoaderOptions.class.getMethod("setCodePointLimit", int.class);
207+
method.invoke(loaderOptions, options.getMaxYamlCodePoints());
208+
204209
} catch (ReflectiveOperationException e) {
205210
LOGGER.debug("using snakeyaml < 1.25, not setting YAML Billion Laughs Attack snakeyaml level protection");
206211
}

0 commit comments

Comments
 (0)