GitNexus/gitnexus/src
azizur100389 a418c47e29
fix(server): use ipKeyGenerator for IPv6 subnet normalisation (#1360) (#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).
2026-05-06 14:07:37 +01:00
..
cli fix(setup): prefer .cmd/.bat wrapper from Windows where output (#1299) 2026-05-04 08:25:38 +01:00
config feat(ingestion): GITNEXUS_INDEX_TEST_DIRS opt-in for __tests__ / __mocks__ (#771) (#1046) 2026-04-23 13:49:06 +01:00
core feat(ingestion): add thrift contracts impl (#1234) 2026-05-06 09:19:10 +01:00
lib feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
mcp feat(mcp): add tool safety annotations (#1127) 2026-05-03 09:06:41 +01:00
server fix(server): use ipKeyGenerator for IPv6 subnet normalisation (#1360) (#1374) 2026-05-06 14:07:37 +01:00
storage fix(git): suppress stderr leak in getCurrentCommit and getGitRoot (#1172) (#1341) 2026-05-05 14:29:42 +01:00
types feat(ingestion): language-agnostic heritage extractor with config+factory pattern (#890) 2026-04-17 17:51:17 +01:00