setMaxAliasesForCollections

fun setMaxAliasesForCollections(maxAliasesForCollections: Int): LoadSettingsBuilder

Restrict the number of aliases for collection nodes to prevent 'billion laughs attack'. The purpose of this setting is to force SnakeYAML to fail before a lot of CPU and memory resources are allocated for the parser. Aliases for scalar nodes do not count because they do not grow exponentially.

Return

the builder with the provided value

Parameters

maxAliasesForCollections
  • max number of aliases. More than 50 might be very dangerous. Default is 50