fix(validator): prevent type diff bug in form data parsing (#4753)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
* fix(validator): prevent prototype pollution in form data parsing Use Object.create(null) instead of {} for the form data object and replace `key in form` with `Object.hasOwn(form, key)` to prevent __proto__ keys in FormData from polluting the object prototype chain. Add regression tests verifying null prototype and safe __proto__ handling. * chore: clean up comments in validator.test.ts Remove commented-out lines in the validator test.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+22 added−2 removed
- tests:+20 added−0 removed
- other:+2 added−2 removed