Repository navigation
Conversation
A double-encoded URI could pass checkDisallowedChars() because the Router decoded it only once. Any component decoding it again could then introduce disallowed characters. Decode the URI until it stops changing before validation. The single-decoded path is still used for routing so that URI filter matching stays consistent.
|
The random test failure in this PR ( The random test execution runs the components in parallel, and the Fixed in #10647 by giving |
michalsn
left a comment
There was a problem hiding this comment.
Could you provide a concrete example showing which component decodes the routed value again? %253C becomes literal %3C after one decode, which the whitelist permits. Laravel and Symfony also decode route paths once. Recursive validation would reject previously accepted input, so I'd like to understand the scenario that makes this necessary.
Description
Router::handle()decoded the URI only once, so a multiply-encoded URI could still contain%XXsequences and bypasscheckDisallowedChars()when decoded again. The check now decodes the URI until it stops changing before validating it; routing keeps using the single-decoded path so URI filter matching is unchanged.Checklist: