Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-21520

Internal Server Error for disabled user accounts

    Details

      Description

      Some error 500 (Internal Server Error) might happen on connected pages for disabled users.

      It seems it is related to #EZP-20721 issue and a backport is needed.

        Issue Links

          Activity

          Hide
          Eduardo Fernandes (Inactive) added a comment -

          Issue directly related to
          https://jira.ez.no/browse/EZP-20721

          Show
          Eduardo Fernandes (Inactive) added a comment - Issue directly related to https://jira.ez.no/browse/EZP-20721
          Hide
          Bertrand Dunogier added a comment -

          Unable to reproduce. I get these in the logs:

          security.DEBUG: Read SecurityContext from the session [] []
          security.DEBUG: Reloading user from user provider. [] []
          security.DEBUG: Username "anonymous" was reloaded from user provider. [] []
          app.DEBUG: Checking secure context token: PreAuthenticatedToken(user="anonymous", authenticated=false, roles="") [] []
          app.DEBUG: Trying to pre-authenticate user "-1" [] []
          app.INFO: Authentication success: PreAuthenticatedToken(user="anonymous", authenticated=false, roles="") [] []

          Show
          Bertrand Dunogier added a comment - Unable to reproduce. I get these in the logs: security.DEBUG: Read SecurityContext from the session [] [] security.DEBUG: Reloading user from user provider. [] [] security.DEBUG: Username "anonymous" was reloaded from user provider. [] [] app.DEBUG: Checking secure context token: PreAuthenticatedToken(user="anonymous", authenticated=false, roles="") [] [] app.DEBUG: Trying to pre-authenticate user "-1" [] [] app.INFO: Authentication success: PreAuthenticatedToken(user="anonymous", authenticated=false, roles="") [] []
          Hide
          Joaquim Cavalleri (Inactive) added a comment - - edited

          Reproduced in master

          steps to reproduce:

          . in backend, created a member
          . in front end, (with ezdemo and demo content) logged in with the user
          . browsed to getting started -> OK
          . in backend disabled the user
          . in front end, attempted to access a non cached page (ex: blog)

          [2013-09-23 22:08:32] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was not able to match, message "" [] []
          [2013-09-23 22:08:32] app.INFO: UrlAlias matched location #90. Forwarding to ViewController [] []
          [2013-09-23 22:08:32] request.INFO: Matched route "ez_urlalias" (parameters: "_route": "ez_urlalias", "_controller": "ez_content:viewLocation", "locationId": "90", "viewType": "full", "layout": "true") [] []
          [2013-09-23 22:08:32] security.DEBUG: Read SecurityContext from the session [] []
          [2013-09-23 22:08:32] security.DEBUG: Reloading user from user provider. [] []
          [2013-09-23 22:08:32] security.DEBUG: Username "21520-2" was reloaded from user provider. [] []
          [2013-09-23 22:08:32] app.DEBUG: Checking secure context token: PreAuthenticatedToken(user="21520-2", authenticated=false, roles="ROLE_USER") [] []
          [2013-09-23 22:08:32] app.DEBUG: Trying to pre-authenticate user "109" [] []
          [2013-09-23 22:08:32] app.INFO: Cleared security context due to exception: User account is locked. [] []
          [2013-09-23 22:08:32] security.INFO: Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.) [] []
          [2013-09-23 22:08:32] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException: "A Token was not found in the SecurityContext." at /Users/tretas/git.sources/ezsupport/ezsystems/vendor_at_dev/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php line 56 {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException: A Token was not found in the SecurityContext. at /Users/tretas/git.sources/ezsupport/ezsystems/vendor_at_dev/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php:56)"} []
          [2013-09-23 22:08:32] security.DEBUG: Write SecurityContext in the session [] []
          

          Notes:

          . used 2 different browser, one for back, another for front end
          . removed all cache prior to run this test

          Show
          Joaquim Cavalleri (Inactive) added a comment - - edited Reproduced in master steps to reproduce: . in backend, created a member . in front end, (with ezdemo and demo content) logged in with the user . browsed to getting started -> OK . in backend disabled the user . in front end, attempted to access a non cached page (ex: blog) [2013-09-23 22:08:32] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was not able to match, message "" [] [] [2013-09-23 22:08:32] app.INFO: UrlAlias matched location #90. Forwarding to ViewController [] [] [2013-09-23 22:08:32] request.INFO: Matched route "ez_urlalias" (parameters: "_route": "ez_urlalias", "_controller": "ez_content:viewLocation", "locationId": "90", "viewType": "full", "layout": "true") [] [] [2013-09-23 22:08:32] security.DEBUG: Read SecurityContext from the session [] [] [2013-09-23 22:08:32] security.DEBUG: Reloading user from user provider. [] [] [2013-09-23 22:08:32] security.DEBUG: Username "21520-2" was reloaded from user provider. [] [] [2013-09-23 22:08:32] app.DEBUG: Checking secure context token: PreAuthenticatedToken(user="21520-2", authenticated=false, roles="ROLE_USER") [] [] [2013-09-23 22:08:32] app.DEBUG: Trying to pre-authenticate user "109" [] [] [2013-09-23 22:08:32] app.INFO: Cleared security context due to exception: User account is locked. [] [] [2013-09-23 22:08:32] security.INFO: Authentication exception occurred; redirecting to authentication entry point (A Token was not found in the SecurityContext.) [] [] [2013-09-23 22:08:32] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException: "A Token was not found in the SecurityContext." at /Users/tretas/git.sources/ezsupport/ezsystems/vendor_at_dev/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php line 56 {"exception":"[object] (Symfony\\Component\\Security\\Core\\Exception\\AuthenticationCredentialsNotFoundException: A Token was not found in the SecurityContext. at /Users/tretas/git.sources/ezsupport/ezsystems/vendor_at_dev/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php:56)"} [] [2013-09-23 22:08:32] security.DEBUG: Write SecurityContext in the session [] [] Notes: . used 2 different browser, one for back, another for front end . removed all cache prior to run this test
          Show
          Jérôme Vieilledent (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/526
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/25833942f805a7931e292dcf26842b26eef65e2f
          Hide
          Filipe Dobreira (Inactive) added a comment -

          tc-1826 was created for this issue.

          QA Approved.

          Show
          Filipe Dobreira (Inactive) added a comment - tc-1826 was created for this issue. QA Approved.

            People

            • Assignee:
              Unassigned
              Reporter:
              Eduardo Fernandes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 54 minutes
                54m