Routing icon indicating copy to clipboard operation
Routing copied to clipboard

BadRequestException: Invalid URI

Open ps-hidden opened this issue 10 months ago • 1 comments

Symfony added request uri validation and exception throwing in case of prohibited characters. Would like to see adequate handling of this exception or throw a more understandable exception

ref: https://github.com/symfony/http-foundation/commit/168b77c71e6f02d8fc479db78beaf742a37d3cab#diff-de5d8eb3f1d6537c947f70e0a4673779312a902c083739f472c709c037bcbc30R366-R379

Symfony\Component\HttpFoundation\Request::create("http://foo.com\\bar");

ps-hidden avatar Jan 28 '25 13:01 ps-hidden

sounds right to play nicely with that. which places lead to non-understandable exceptions?

i would assume at least some of the changes will go to the symfony cmf RoutingBundle, as the model and entity/document classes live there. though we have to be careful about BC, and about how the model might be created in several steps, or a workflow might even be constructed to start with an invalid model...

glad to review a pull request if you have any suggestions where we need to adjust the cmf repository for better error reporting.

dbu avatar Feb 09 '25 07:02 dbu