Skip to content

Commit

Permalink
Fixed isssue #19500: [security] As a non super admin, I can still acc…
Browse files Browse the repository at this point in the history
…ess phpinfo page (#3801)

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
  • Loading branch information
gabrieljenik and lapiudevgit committed Apr 12, 2024
1 parent a1c67f9 commit 4cc6e2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/controllers/admin/globalsettings.php
Expand Up @@ -58,9 +58,10 @@ public function index()
*/
public function showphpinfo()
{
if (!Yii::app()->getConfig('demoMode')) {
phpinfo();
if (Yii::app()->getConfig('demoMode') || !Permission::model()->hasGlobalPermission('superadmin', 'read')) {
throw new CHttpException(403, gT("You do not have permission to access this page."));
}
phpinfo();
}

/**
Expand Down

0 comments on commit 4cc6e2c

Please sign in to comment.