LibreChat/api/server
Danny Avila 6e8f44d72b
Some checks failed
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Has been cancelled
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Has been cancelled
GitNexus Index / index (push) Has been cancelled
GitNexus Index / post-index (push) Has been cancelled
🪆 fix: Serve Nested Skill Files Through a Wildcard Route (#14191)
Nested skill files (references/, scripts/, assets/) returned 404 when
opened, while top-level SKILL.md worked. The file routes matched a single
`:relativePath` segment, so a nested path only resolves when the encoded
`%2F` reaches Node intact. Reverse proxies (nginx, Traefik, k8s ingress,
ALB, Cloudflare) commonly normalize `%2F` to a literal slash before
forwarding, which turns the path into multiple segments the single-segment
route can no longer match.

Switch the GET/DELETE file routes to an Express 5 splat (`*relativePath`)
and reconstruct the path from the decoded segments, so nested files resolve
whether the client sends `%2F` or a proxy decoded it to a literal slash.

Security: add a shared `isSafeSkillFilePath` validator (extracted from the
import validator, single source of truth) and reject traversal/absolute/
empty-segment paths at the route layer. Lookups remain exact DB matches, so
the user-supplied path never touches the filesystem.

Also drops a latent double-decode (Express already decodes route params).

Closes #14190
2026-07-09 16:52:11 -04:00
..
controllers 🗂️ feat: Per-Agent Memory Partitions (#14084) 2026-07-09 10:48:51 -04:00
middleware 💂 fix: Enforce ALLOW_EMAIL_LOGIN on the Backend Login Route (#14180) 2026-07-09 09:55:36 -04:00
routes 🪆 fix: Serve Nested Skill Files Through a Wildcard Route (#14191) 2026-07-09 16:52:11 -04:00
services 🔡 fix: Normalize Email Case When Issuing Verification Tokens (#14172) 2026-07-09 08:42:39 -04:00
utils 🔄 feat: Continue Shared Conversations as Personal Copies (#13714) 2026-06-24 16:27:01 -04:00
cleanup.js
experimental.js 🧹 feat: Eager HITL Checkpoint Cleanup (Expiry + Deletion) & Full-Wiring E2E (#14123) 2026-07-05 11:29:30 -04:00
index.js 🧹 feat: Eager HITL Checkpoint Cleanup (Expiry + Deletion) & Full-Wiring E2E (#14123) 2026-07-05 11:29:30 -04:00
index.metrics.spec.js ⚖️ feat: Add Operational Prometheus Metrics (#13265) 2026-05-22 20:47:41 -04:00
index.spec.js ⚙️ refactor: lazy-load React Query Devtools (#13639) 2026-06-10 13:06:20 -04:00
socialLogins.js ⏳ feat: Make OpenID Token Reuse Window Configurable (#13546) 2026-06-06 15:15:58 -04:00
socialLogins.spec.js ⏳ feat: Make OpenID Token Reuse Window Configurable (#13546) 2026-06-06 15:15:58 -04:00
telemetry.js 📡 feat: Add Backend OpenTelemetry Tracing (#12909) 2026-05-14 09:08:55 -04:00
telemetry.spec.js 📡 feat: Add Backend OpenTelemetry Tracing (#12909) 2026-05-14 09:08:55 -04:00