mirror of
https://github.com/caddyserver/caddy.git
synced 2026-11-11 19:37:55 +00:00
Lowercasing and slash-preserving path cleaning rewrote invalid UTF-8 bytes as U+FFFD, so the path matcher could evaluate a different path than the file server opens. Preserve the original bytes in both, keeping case-insensitive matching for valid Unicode. Addresses scan report 18c02f60a5b43529. Code written by GitHub Copilot (GPT-6.1 Sol, Claude Opus 5.5); reviewed by mholt. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>