Skip to content

Untrusted host leads to a 500 response #20615

@thewilkybarkid

Description

@thewilkybarkid

Request::getHost() throws a UnexpectedValueException if the host is invalid/untrusted. This is not caught, leading to a FatalErrorException and a 500 Internal Server Error response.

This should be a 400 Bad Request response instead (it's a client not a server error; the description mentions deceptive request routing).

(For comparison, Django has a SuspiciousOperation exception that results in a HttpResponseBadRequest.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions