caddy/modules/caddyhttp/reverseproxy
Kévin Dunglas fb324331f4
Merge commit from fork
Both fallbacks in splitPos relied on golang.org/x/text/search with
search.IgnoreCase, which performs Unicode equivalence matching far beyond
ASCII case folding. Combined with the validated-ASCII guarantee on every
SplitPath entry, that fallback turned non-PHP filenames into PHP scripts:

- when the inner loop hit a non-ASCII byte and the IndexString fallback
  returned -1, the loop broke without resetting match=false, so a stale
  match=true caused a non-existent .php to be reported (PoC:
  "/name.<U+00A1>.txt").
- search.IgnoreCase folded fullwidth, mathematical and circled letters
  onto ASCII, so "/shell.<math sans-serif php>",
  "/shell.<fullwidth p>hp", "/shell.<circled php>" were all detected as
  ".php" files.

Replace the fallback with strict byte-level ASCII case-insensitive
matching: any byte >= utf8.RuneSelf in the path can never be part of a
match, since SplitPath entries are validated ASCII-only and lower-cased
in Provision(). This keeps the hot path branch-light and removes the
x/text/search dependency from the main module.

Reported against FrankenPHP as GHSA-3g8v-8r37-cgjm and
GHSA-v4h7-cj44-8fc8. The vulnerable function in this module was adapted
from the same FrankenPHP code.
2026-05-07 13:59:42 -06:00
..
fastcgi Merge commit from fork 2026-05-07 13:59:42 -06:00
forwardauth forward_auth: `copy_headers` does not strip client-supplied identity headers (Fixes GHSA-7r4p-vjf4-gxv4) (#7545) 2026-03-03 23:30:49 -05:00
addresses.go
addresses_test.go
admin.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
admin_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
ascii.go
ascii_test.go
buffering_test.go
caddyfile.go reverseproxy: add `lb_retry_match` condition on response status (#7569) 2026-04-21 14:59:31 -04:00
command.go cmd: prevent commas in header values from being split (#7268) 2025-09-22 21:12:06 -06:00
copyresponse.go
dynamic_upstreams_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
headers_test.go chore: replace `interface{}` with `any` for modernization (#7571) 2026-04-11 19:53:12 +03:00
healthchecks.go reverseproxy: Fix `health_port` being ignored in health checks (#7533) 2026-03-03 13:10:54 -05:00
hosts.go admin: Redact sensitive request headers in API logs (#7578) 2026-04-17 14:56:42 -06:00
httptransport.go Wire up Cause for most context cancels (#7538) 2026-03-04 17:14:52 -07:00
httptransport_test.go root: introduce down-propagating Helper.BlockState for other directives/plugins to use (#7594) 2026-03-28 17:44:42 +00:00
metrics.go
passive_health_test.go reverseproxy: Track dynamic upstreams, enable passive healthchecking (#7539) 2026-03-04 15:05:26 -05:00
retries_test.go reverseproxy: add `lb_retry_match` condition on response status (#7569) 2026-04-21 14:59:31 -04:00
reverseproxy.go reverseproxy: Add ability to clear dynamic upstreams cache during retries (#7662) 2026-04-28 09:16:18 -06:00
selectionpolicies.go chore: Fix golangci-lint 2.12.1 findings (#7690) 2026-05-07 03:40:26 -04:00
selectionpolicies_test.go
streaming.go reverseproxy: make stream copy buffer size configurable (#7627) 2026-04-10 14:49:32 -06:00
streaming_test.go reverseproxy: make stream copy buffer size configurable (#7627) 2026-04-10 14:49:32 -06:00
upstreams.go reverseproxy: Add ability to clear dynamic upstreams cache during retries (#7662) 2026-04-28 09:16:18 -06:00
upstreams_test.go