Catch potential exception when calling Request::create() in PathBasedBreadcrumbBuilder

Created on 29 November 2024, 22 days ago

Problem/Motivation

Due to https://github.com/advisories/GHSA-mrqx-rp3w-jpjp symfony/http-foundation 7.1.7 and 6.4.14 patched Request::create() to throw a BadRequestException exception on certain invalid URLs. When processing such an invalid path, PathBasedBreadcrumbBuilder now throws this new exception.

Steps to reproduce

Visit certain invalid paths such as /:123/foo - an exception will be thrown by PathBasedBreadcrumbBuilder (as can be seen by inspecting the stacktrace of one of the chained exceptions)

Proposed resolution

PathBasedBreadcrumbBuilder should instead catch the new exception and return NULL, which indicates "the path couldn't be matched" and skips this breadcrumb, as it did before the symfony/http-foundation update.

Remaining tasks

User interface changes

Sites will once again respond with the 404 error page when such invalid URLs are requested, as they did before the symfony/http-foundation update.

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs review

Version

11.0 🔥

Component

system.module

Created by

🇺🇸United States mfb San Francisco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024