DefaultExceptionHtmlSubscriber should not clone the request for 401s

Created on 12 November 2024, 3 months ago

Problem/Motivation

This was originally reported to the security team but was cleared for a public issue.

DefaultExceptionHtmlSubscriber clones the original request when making a subrequest to display 401 error messages.

However a BadRequestException means the request is bad, and if code called on the error page (e.g. form building) throws another BadRequestException this can create an infinite loop.

Steps to reproduce

Proposed resolution

Get rid of the subrequest for 400 errors and just show a basic error page.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

base system

Created by

πŸ‡¬πŸ‡§United Kingdom catch

Live updates comments and jobs are added and updated live.
  • Security improvements

    It makes Drupal less vulnerable to abuse or misuse. Note, this is the preferred tag, though the Security tag has a large body of issues tagged to it. Do NOT publicly disclose security vulnerabilities; contact the security team instead. Anyone (whether security team or not) can apply this tag to security improvements that do not directly present a vulnerability e.g. hardening an API to add filtering to reduce a common mistake in contributed modules.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024