Skip to content

Releases: BackendStack21/0http

v5.0.1

31 May 09:07
eabbfce

Choose a tag to compare

Bug fixes and a request hot-path performance improvement. No API changes.

⚠️ Notable behavior change

  • prioRequestsProcessing now correctly defaults to true even when you pass a partial config (e.g. zero({ router }), zero({ errorHandler })). Previously the documented default only applied to the zero-argument call zero(), and any config object silently disabled it. On standard http/https servers this means requests are now dispatched via setImmediate as documented. Set prioRequestsProcessing: false explicitly to opt out. (#52)

Bug fixes

  • Cross-request req.params leak: route matches served from the LRU cache shared a single params object across all requests to the same method+path. A middleware mutating req.params could bleed state into later requests. req.params is now shallow-copied per request. (#52)

Performance

  • ~36% faster query-string parsing on the request hot path: the array-notation regex now runs only when []= is present, and the prototype-pollution segment check skips its per-parameter allocation for normal keys. Behavior is identical, including __proto__/prototype/constructor filtering. (#53)

Internal

  • Landing page modernized; added regression and query-parser tests (suite: 71 passing, query parser at 100% line coverage).
  • Removed the TRON donate address from the README Support section. (#54)

Full changelog: v5.0.0...v5.0.1

v5.0.0 — Safe-by-default error handler

14 May 16:21

Choose a tag to compare

Breaking Change

DEFAULT_ERROR_HANDLER is now safe-by-default. Error details are only exposed when NODE_ENV=development.

NODE_ENV Before (v4.x) After (v5.0)
unset ❌ leaks err.message ✅ Internal Server Error
production ✅ safe ✅ safe
development ❌ leaks ✅ leaks (by design)
staging ❌ leaks ✅ safe
testing ❌ leaks ✅ safe

If your app relies on error messages in non-development environments, set NODE_ENV=development or provide a custom errorHandler in router config.

Security

Comprehensive penetration test suite added (tooling/pentest.js) — 48 vectors across 10 categories:

  • 13 prototype pollution vectors — all blocked (direct, encoded, double-encoded, nested)
  • 8 path traversal vectors — all blocked (dot-dot, null byte, quad-dot)
  • 6 DoS vectors — all resilient (large queries, cache exhaustion, deep nesting)
  • 5 information disclosure vectors — all safe
  • 6 method confusion and cache vectors — all clean
  • 3 request tampering vectors — all protected

Changed Files

  • lib/router/sequential.js — flipped error handler condition + Content-Type header
  • tests/nested-routers.test.js — updated error expectations
  • tests/router-coverage.test.js — updated error expectations
  • tests/v4.4.test.js — added NODE_ENV-unset test
  • tooling/pentest.js — new 48-vector security test suite

Full Changelog: v4.4.0...v5.0.0

v4.4.0

18 Nov 19:02
e122174

Choose a tag to compare

What's Changed

  • chore: update Node.js version to 22.x in workflow and package.json by @jkyberneees in #49
  • feat: enhance error handler security, optimize static nested routing and docs by @jkyberneees in #50

Full Changelog: v4.3.0...v4.4.0

v4.3.0

31 Jul 18:07

Choose a tag to compare

What's Changed

Full Changelog: v4.2.1...v4.3.0

v4.2.1

25 May 16:36

Choose a tag to compare

What's Changed

  • Enhance performance and security across router and query parameter handling by @jkyberneees in #43

Full Changelog: v4.2.0...v4.2.1

v4.2.0

25 Feb 17:52

Choose a tag to compare

Changes:

Screenshot 2025-02-25 at 18 49 00

Full Changelog: v4.1.0...v4.2.0

v4.1.0

26 Jan 09:50

Choose a tag to compare

What's Changed

  • Fixing default init of sequential router and improving cache by @jkyberneees in #41

Full Changelog: v4.0.0...v4.1.0

v4.0.0

04 Jan 21:14

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.5.3...v4.0.0

Deps update + Performance Improvements

06 Apr 08:29

Choose a tag to compare

What's Changed

Full Changelog: v3.5.2...v3.5.3

Remove "v" from package version in package.json

22 Apr 19:18

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v3.5.1...v3.5.2