I have been utilizing the npm module yaml
to convert complex, interdependent JavaScript objects into a text format that can be easily restored in Javascript. Additionally, I use this package for deep copying of deeply nested objects by serializing and then deserializing them.
Recently, I encountered an error message related to the maximum object size:
Excessive alias count indicates a resource exhaustion attack
Is there a real risk when serializing inter-referential objects if YAML only creates alias references? (There shouldn't be any issues with cyclic traversal in the graph, correct?) – Is there a way to bypass or adjust this max limit, or perhaps an alternative method for storing inter-referential objects as text / deep-copying them?
Thank you!
Edit: I decided to go with flyx
's response as it provided a clearer explanation on why there is a limitation on alias count, while rexfordkelly
offered insights on how to deactivate this check within the npm yaml
library.