Repository navigation
v1.8.40
Security fixes for the 1.x line. Published on npm with the legacy tag; latest is 2.x. Install it with npm install json-function@legacy.
Fixed
searchpassed the key toRegExpunescaped. A key such as"("threw, and a pattern such as"(a+)+$"could hang the process (ReDoS). The key is now matched as plain text, as documented.transformconverted a key such as"____proto____"to"__proto__"and assigned it, so JSON input could replace the prototype of the returned object. The key is now kept as an own property.
Code that relied on search treating the key as a regular expression gets plain-text matching instead. This behavior was never documented.
Both issues are also fixed in 2.0.0.
Full changes: #36