Skip to content

Commit

Permalink
refs #1912 - fix missing Yaml LoaderOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Apr 18, 2023
1 parent 7ff9e99 commit ba13af5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@ public static LoaderOptions buildLoaderOptions() {
method.invoke(loaderOptions, options.getMaxYamlAliasesForCollections());
method = LoaderOptions.class.getMethod("setAllowRecursiveKeys", boolean.class);
method.invoke(loaderOptions, options.isYamlAllowRecursiveKeys());
method = LoaderOptions.class.getMethod("setAllowDuplicateKeys", boolean.class);
method.invoke(loaderOptions, false);
method = LoaderOptions.class.getMethod("setCodePointLimit", int.class);
method.invoke(loaderOptions, options.getMaxYamlCodePoints());

} catch (ReflectiveOperationException e) {
LOGGER.debug("using snakeyaml < 1.25, not setting YAML Billion Laughs Attack snakeyaml level protection");
}
Expand Down

0 comments on commit ba13af5

Please sign in to comment.