Skip to content

Tags: jroell/GitNexus

Tags

rc/a418c47e29f0209492cff0589fe7b9e54eff5f24

Toggle rc/a418c47e29f0209492cff0589fe7b9e54eff5f24's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(server): use ipKeyGenerator for IPv6 subnet normalisation (abhigy…

…anpatwari#1360) (abhigyanpatwari#1374)

The custom keyGenerator in createRouteLimiter referenced req.ip without
passing it through express-rate-limit's ipKeyGenerator helper.  This
caused ERR_ERL_KEY_GEN_IPV6 on startup when binding to 0.0.0.0, and
meant each full IPv6 address got its own rate-limit counter — trivially
bypassing the per-IP limit.

Wrap the IP through ipKeyGenerator so IPv6 addresses are collapsed to
their /56 subnet before keying the counter.  The existing fallback chain
(req.ip → socket.remoteAddress → 'unknown') is preserved to keep
ERR_ERL_UNDEFINED_IP_ADDRESS from firing on abruptly closed connections.

Tests: 3 new assertions (construction-time regression guard, source-grep
for import and call site).

v1.2.8

Toggle v1.2.8's commit message
chore: bump gitnexus to v1.2.8