SIGN IN SIGN UP
honojs / hono UNCLAIMED

Web framework built on Web Standards

0 0 78 TypeScript

fix(validator): prevent type diff bug in form data parsing (#4753)

* 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.
E
EdamAmex committed
4bb70fafbc4819b2e3ef64a0c5fb4ba55e315bba
Parent: df97e5f
Committed by GitHub <noreply@github.com> on 2/24/2026, 7:07:53 AM