Skip to content

Releases: serbanghita/form-to-object

v3.2.2 - Security and Hardening Update

Choose a tag to compare

@serbanghita serbanghita released this 02 Aug 13:59
v3.2.2
1b57f91

What's Changed in v3.2.2

🛡️ Security & Hardening

  • Prototype Pollution Defense-in-Depth:
    • Added isDangerousKey() validator and runtime-frozen DANGEROUS_KEYS (Object.freeze(['__proto__', 'constructor', 'prototype'])).
    • Sanitized extend() and convertFieldNameToArrayOfKeys() in src/utils.ts.
    • Guarded processSingleLevelNode() and processMultiLevelNode() in src/FormToObject.ts.
    • Added comprehensive unit tests for prototype pollution payload vectors.
  • Dependency Remediation:
    • Upgraded vitest and @vitest/coverage-v8 to 4.1.10, resolving all 7 vulnerabilities (found 0 vulnerabilities).

🐛 Bug Fixes & Robustness

  • CSS Selector Error Handling:
    • Invalid CSS selector syntax (e.g. :invalid[) is now caught gracefully as SyntaxError without throwing unhandled DOMException, returning false so the constructor produces the standard form-not-found error while re-throwing unexpected runtime errors.
  • CI/CD Modernization:
    • Upgraded GitHub Actions in .github/workflows/test.yml to @v4 (actions/checkout@v4, actions/setup-node@v4, codecov/codecov-action@v4).

Full Changelog: v3.2.1...v3.2.2