Skip to content

Commit

Permalink
Fixed issue #6605: Saving global settings returns to invalid referer URL
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Nov 7, 2012
1 parent f9ad359 commit ca9a53f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions application/controllers/admin/globalsettings.php
Expand Up @@ -65,6 +65,11 @@ private function _displaySettings()

//save refurl from where global settings screen is called!
$refurl = Yii::app()->getRequest()->getUrlReferrer();

// Some URLs are not to be allowed to refered back to.
// These exceptions can be added to the $aReplacements array
$aReplacements=array('admin/user/adduser'=>'admin/user/index');
$refurl= str_replace(array_keys($aReplacements),array_values($aReplacements),$refurl);
Yii::app()->session['refurl'] = htmlspecialchars($refurl); //just to be safe!

$data['clang'] = $this->getController()->lang;
Expand Down

0 comments on commit ca9a53f

Please sign in to comment.