DataDog / dd-native-appsec-js

Node.js bindings for libddwaf
Apache License 2.0
1 stars 3 forks source link

Prevent circular dependencies #101

Closed uurien closed 8 months ago

uurien commented 8 months ago

What does this PR do?

Prevents circular dependencies when an object is converted to ddwaf object. If the circular dependency is detected, it replaces the circular dependency by invalid object.

Motivation

Prevent infinite or too long iterations

Additional Notes

Describe how to test your changes

Checklist

APPSEC-51953

simon-id commented 8 months ago

you're gonna have a conflict with the other PR, let's merge the toJSON one before no ?

uurien commented 8 months ago

you're gonna have a conflict with the other PR, let's merge the toJSON one before no ?

Yes, I'm not care of the conflict, but yes, let's merge the other PR first.