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

Formtoken exception is thrown when logging in without debug redirection

    Details

      Description

      Logging in without debug and debug redirection will throw a fatal error

      Error in prod.log file

      [2014-05-22 16:51:35] security.DEBUG: Write SecurityContext in the session [] []
      [2014-05-22 16:51:51] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\DefaultRouter was not able to match, message "" [] []
      [2014-05-22 16:51:51] app.INFO: Router eZ\Bundle\EzPublishCoreBundle\Routing\UrlAliasRouter was not able to match, message "Config says to bypass UrlAliasRouter" [] []
      [2014-05-22 16:51:51] request.INFO: Matched route "ez_legacy" (parameters: "_route": "ez_legacy", "_controller": "ezpublish_legacy.controller:indexAction") [] []
      [2014-05-22 16:51:51] security.INFO: Populated SecurityContext with an anonymous Token [] []
      [2014-05-22 16:51:51] app.DEBUG: Legacy kernel: Leaving '/var/www/html/ezpublish5/web' for '/var/www/html/ezpublish5/ezpublish/../ezpublish_legacy' [] []
      [2014-05-22 16:51:51] app.DEBUG: Legacy kernel: Leaving '/var/www/html/ezpublish5/ezpublish/../ezpublish_legacy' for '/var/www/html/ezpublish5/web' [] []
      [2014-05-22 16:51:51] app.DEBUG: Legacy kernel: Leaving '/var/www/html/ezpublish5/web' for '/var/www/html/ezpublish5/ezpublish/../ezpublish_legacy' [] []
      [2014-05-22 16:51:51] request.CRITICAL: Uncaught PHP Exception Exception: "Wrong form token found in Request!" at /var/www/html/ezpublish5/ezpublish_legacy/extension/ezformtoken/event/ezxformtoken.php line 152 {"exception":"[object] (Exception: Wrong form token found in Request! at /var/www/html/ezpublish5/ezpublish_legacy/extension/ezformtoken/event/ezxformtoken.php:152)"} []
      

        Issue Links

          Activity

          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          Regression from EZP-22767 . LegacyHelper is filled even if the result is an ezpKernelRedirect, triggering a form token exception when request is POST.
          Makes sense since LegacyHelper uses runCallback() which in this case re-triggers request parsing by the legacy kernel. As request is POST, it legitimately looks for the form token.

          For some reason, the issue does not happen with XDebug on.

          Show
          Jérôme Vieilledent (Inactive) added a comment - Regression from EZP-22767 . LegacyHelper is filled even if the result is an ezpKernelRedirect , triggering a form token exception when request is POST. Makes sense since LegacyHelper uses runCallback() which in this case re-triggers request parsing by the legacy kernel. As request is POST, it legitimately looks for the form token. For some reason, the issue does not happen with XDebug on.
          Show
          Jérôme Vieilledent (Inactive) added a comment - See comment on the commit that caused the regression .
          Show
          Jérôme Vieilledent (Inactive) added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/875
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezpublish-kernel/commit/4467532c4703317d55b82303c990c7559c9eaa28
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Pingo (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: