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

AccessDeniedException is logged as a CRITICAL whenever authentication is required #27608

Copy link
Copy link
Closed
@junowilderness

Description

@junowilderness
Issue body actions

Symfony version(s) affected: 4.1.0

Description
Symfony 4.1.0 logs a request.CRITICAL whenever authentication is required.

[2018-06-14 20:52:10] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2018-06-14 20:52:10] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Security\Core\Exception\AccessDeniedException: "Access Denied." at /Users/cjm/Sites/website-skeleton/vendor/symfony/security/Http/Firewall/AccessListener.php line 68 {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied. at /Users/cjm/Sites/website-skeleton/vendor/symfony/security/Http/Firewall/AccessListener.php:68)"} []
[2018-06-14 20:52:10] security.DEBUG: Access denied, the user is not fully authenticated; redirecting to authentication entry point. {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AccessDeniedException(code: 403): Access Denied. at /Users/cjm/Sites/website-skeleton/vendor/symfony/security/Http/Firewall/AccessListener.php:68)"} []
[2018-06-14 20:52:10] security.DEBUG: Calling Authentication entry point. [] []

This behavior is different than Symfony 3, which does not log the request.CRITICAL. It should be silenced because the exception is actually caught.

How to reproduce

  1. Follow part 1-a on https://symfony.com/doc/current/security.html to configure basic authentication. Observe the log file when the /admin route receives a GET request.

Possible Solution

Additional context

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.