Disable prototype poisoning option (#1414)

* Introduce disablePrototypePoisoningProtection option

* Updated test

* Updated docs

* Fix bundler test
This commit is contained in:
Tomas Della Vedova
2021-03-15 08:51:45 +01:00
committed by GitHub
parent 36eaed6466
commit 6a30cd9955
9 changed files with 166 additions and 31 deletions

View File

@ -244,4 +244,8 @@ const client = new Client({
})
----
|`disablePrototypePoisoningProtection`
|`boolean`, `'proto'`, `'constructor'` - By the default the client will protect you against prototype poisoning attacks. Read https://web.archive.org/web/20200319091159/https://hueniverse.com/square-brackets-are-the-enemy-ff5b9fd8a3e8?gi=184a27ee2a08[this article] to learn more. If needed you can disable prototype poisoning protection entirely or one of the two checks. Read the `secure-json-parse` https://github.com/fastify/secure-json-parse[documentation] to learn more. +
_Default:_ `false`
|===