Skip to content

Commit

Permalink
security fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noumo committed Jun 4, 2015
1 parent 2ef15ac commit 60907d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public function beforeAction($action)

if(Yii::$app->user->isGuest){
Yii::$app->user->setReturnUrl(Yii::$app->request->url);
return $this->redirect(['/admin/sign/in']);
Yii::$app->getResponse()->redirect(['/admin/sign/in'])->send();
return false;
}
else{
if(!IS_ROOT && ($this->rootActions == 'all' || in_array($action->id, $this->rootActions))){
Expand Down

0 comments on commit 60907d2

Please sign in to comment.