Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.4.25][BC Break] 403 instead of 401 for unauthorized users #31136

Copy link
Copy link
Closed
@JarJak

Description

@JarJak
Issue body actions

Symfony version(s) affected: 3.4.25

Description
Symfony now returns 403 instead of 401 for unauthorized users.

How to reproduce

  1. Create controller with a security voter like $this->denyAccessUnlessGranted(...)
  2. Try to access this route with an unauthorized user
  3. Observe different status codes (401 in 3.4.24 vs 403 in 3.4.25)

Possible Solution
Undo this change, or at least provide instructions how to revert to old behavior, or at least mention it explicitly in the changelog / upgrade files.
Even if the change is good (IMO 403 is better, see http://www.dirv.me/blog/2011/07/18/understanding-403-forbidden/index.html) this is a BC Break for apps that react on 401 status but not on 403.

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.