Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
782242e6 fix(router-core): preserve percent-encoded URL-unsafe chars in decodeSegment
Replace decodeURI()-based decoding with per-character decoding that
preserves the WHATWG URL path percent-encode set ({, }, <, >, ", `)
and ASCII control characters (0x00-0x1F, 0x7F) in their encoded form.
Previously, decodeSegment decoded these characters and sanitizePathSegment
stripped the control chars. This created mismatches between the original
request URL and the router's internal representation, causing infinite
307 redirect loops on paths like /%7B%7Btemplate%7D%7D.
By keeping these characters encoded, the router's path representation
matches what browsers and upstream layers send, eliminating the mismatch
that triggered spurious redirects.
Fixes #7587.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>