LibreChat/packages
Danny Avila 594d9470d5
🪤 fix: Avoid express-rate-limit v8 ERR_ERL_KEY_GEN_IPV6 False Positive (#12333)
* fix: avoid express-rate-limit v8 ERR_ERL_KEY_GEN_IPV6 false positive

express-rate-limit v8 calls keyGenerator.toString() and throws
ERR_ERL_KEY_GEN_IPV6 if the source contains the literal substring
"req.ip" without "ipKeyGenerator". When packages/api compiles
req?.ip to older JS targets, the output contains "req.ip",
triggering the heuristic.

Bracket notation (req?.['ip']) produces identical runtime behavior
but never emits the literal "req.ip" substring regardless of
compilation target.

Closes #12321

* fix: add toString regression test and clean up redundant annotation

Add a test that verifies removePorts.toString() does not contain
"req.ip", guarding against reintroduction of the ERR_ERL_KEY_GEN_IPV6
false positive. Fix a misleading test description and remove a
redundant type annotation on a trivially-inferred local.
2026-03-20 12:32:55 -04:00
..
api 🪤 fix: Avoid express-rate-limit v8 ERR_ERL_KEY_GEN_IPV6 False Positive (#12333) 2026-03-20 12:32:55 -04:00
client 📦 chore: Bump @dicebear dependencies to v9.4.1 (#12315) 2026-03-19 16:44:38 -04:00
data-provider 📖 feat: Add Native ODT Document Parser Support (#12303) 2026-03-19 15:49:52 -04:00
data-schemas v0.8.4-rc1 (#12285) 2026-03-17 16:08:48 -04:00