caddy/modules
Matthew Holt 7591cff1fb
Some checks failed
Tests / test (./cmd/caddy/caddy, ~1.27.0, macos-latest, 0, 1.27, mac) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy, ~1.27.0, ubuntu-latest, 0, 1.27, linux) (push) Has been cancelled
Tests / test (./cmd/caddy/caddy.exe, ~1.27.0, windows-latest, True, 1.27, windows) (push) Has been cancelled
Tests / test (s390x on IBM Z) (push) Has been cancelled
Tests / goreleaser-check (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, aix) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, darwin) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, dragonfly) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, freebsd) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, illumos) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, linux) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, netbsd) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, openbsd) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, solaris) (push) Has been cancelled
Cross-Build / build (~1.26.0, 1.26, windows) (push) Has been cancelled
Lint / lint (push) Has been cancelled
Lint / lint-1 (push) Has been cancelled
Lint / lint-2 (push) Has been cancelled
Lint / govulncheck (push) Has been cancelled
Lint / dependency-review (push) Has been cancelled
OpenSSF Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
rewrite: escape regexp captures in rewritten paths
The rewrite handler percent-decodes the path after expanding placeholders.
Regexp captures, usually taken from the already-decoded request path by
path_regexp, were inserted verbatim, so a double-encoded "../" or "?"
became a real separator or query string after path guards had run.

{http.regexp.*} values are now escaped like the other path-derived
placeholders (slashes preserved) when used in the path part of a rewrite.
Captures intentionally used to inject "?" into the path from a header or
other source must now set the query explicitly.

Based on a patch by Adel Assakaf.
Reviewed by mholt.

Code written by GitHub Copilot (Claude Opus 5.5), adapting the
contributor's patch.

Co-authored-by: Adel Assakaf <212399165+assakafpix@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-11 12:25:23 -07:00
..
caddyevents events: tell CertMagic which events are worth emitting (#8010) 2026-10-03 01:03:20 +10:00
caddyfs events: Refactor; move Event into core, so core can emit events (#6930) 2025-03-29 08:15:43 -06:00
caddyhttp rewrite: escape regexp captures in rewritten paths 2026-11-11 12:25:23 -07:00
caddypki acmeserver: say when the CA database is locked by another process (#8007) 2026-09-11 14:49:31 +10:00
caddytls caddytls: preserve regexp quantifiers during placeholder expansion 2026-11-11 11:06:41 -07:00
filestorage caddyfile: Normalize & flatten all unmarshalers (#6037) 2024-01-23 19:36:59 -05:00
internal/network reverseproxy: reduce lock contention in dynamic SRV and A upstreams (#7949) 2026-11-03 08:37:50 +00:00
logging logging: filter typed string and certificate SAN arrays 2026-11-11 11:06:40 -07:00
metrics metrics: scope metrics to active config, add optional per-host metrics (#6531) 2024-10-02 08:23:26 -06:00
standard filesystem: Globally declared filesystems, fs directive (#5833) 2024-01-13 20:12:43 +00:00