Closed
Description
Symfony version(s) affected
5.4.14
Description
After upgrading Symfony from 4.4 to 5.4, some of our users complained that some generated links no longer worked. We tracked down that these all contained %2F
. These links were previously generated with %252F
. Parameters with slashes cause an error in Symfony, so these values must be URL encoded first to %2F
. When this is passed in as a parameter, %
should become %25
, making %2F
into %252F
. However, something is preventing %2F
from being further encoded as all other sequences encode correctly.
How to reproduce
Twig:
{{ url('name_of_route', {parameter: '%2F'}) }}
Symfony:
class MyController extends AbstractController {
public function myAction(\Symfony\Component\HttpFoundation\Request $request) {
$this->generateUrl('name_of_route', ['parameter' => '%2F']);
}
}
Possible Solution
No response
Additional Context
No response