ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 12266


Ignore:
Timestamp:
Jul 15, 2009, 12:56:57 AM (14 years ago)
Author:
ebihara
Message:

fixed that an action displays 500 error if the action executes the sfWebRequest::checkCSRFProtection() method

Location:
OpenPNE3/trunk
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/filter/sfOpenPNEExecutionFilter.class.php

    r11479 r12266  
    4343      $this->forwardToErrorAction();
    4444    }
     45    catch (sfValidatorErrorSchema $e)
     46    {
     47      if (isset($e['_csrf_token']))
     48      {
     49        $this->forwardToCSRFErrorAction();
     50      }
     51
     52      throw $e;
     53    }
    4554
    4655    $dispatcher->notify(new sfEvent($this, 'op_action.post_execute_'.$moduleName.'_'.$actionName, array(
     
    6069    throw new sfStopException();
    6170  }
     71
     72  protected function forwardToCSRFErrorAction()
     73  {
     74    $this->context->getController()->forward('default', 'csrfError');
     75
     76    throw new sfStopException();
     77  }
    6278}
Note: See TracChangeset for help on using the changeset viewer.