davidmarkclements / fast-redact

very fast object redaction
MIT License
278 stars 30 forks source link

fix: properly restore values matching multiple paths #35

Closed th3hunt closed 3 years ago

th3hunt commented 3 years ago

Fixes #33

The fix

Restoration of the redacted object happens backwards, in reverse order of redactions, so that repeated redactions on the same object property can be eventually rolled back to the original value.

This way dynamic redactions are restored first, starting from the last one working backwards and followed by the static ones.

davidmarkclements commented 3 years ago

very nice - thanks @th3hunt - releasing now