BUG-14986 Authorization Bypass via Forceful Browsing IMPROVEMENT

This commit is contained in:
Marco Antonio Nina
2014-06-20 16:08:47 -04:00
parent 542aba432f
commit 2cdd7c1a02
11 changed files with 32 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ class Admin extends Controller
public function system () public function system ()
{ {
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'main.php'; require_once PATH_CONTROLLERS . 'main.php';
G::loadClass( 'system' ); G::loadClass( 'system' );
$skinsList = System::getSkingList(); $skinsList = System::getSkingList();
@@ -60,6 +62,8 @@ class Admin extends Controller
public function uxList () public function uxList ()
{ {
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
require_once PATH_CONTROLLERS . 'adminProxy.php'; require_once PATH_CONTROLLERS . 'adminProxy.php';
$this->includeExtJS( 'admin/uxUsersList' ); $this->includeExtJS( 'admin/uxUsersList' );
G::LoadClass( 'configuration' ); G::LoadClass( 'configuration' );

View File

@@ -16,6 +16,12 @@ class Dashboard extends Controller
// Class constructor // Class constructor
public function __construct () public function __construct ()
{ {
global $RBAC;
if ($RBAC->userCanAccess('PM_DASHBOARD') != 1) {
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header( 'location: login/login' );
exit(0);
}
G::LoadClass( 'pmDashlet' ); G::LoadClass( 'pmDashlet' );
$this->pmDashlet = new PMDashlet(); $this->pmDashlet = new PMDashlet();
} }

View File

@@ -22,9 +22,11 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/ */
global $RBAC;
if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) { if (($RBAC_Response = $RBAC->userCanAccess( "PM_LOGIN" )) != 1) {
return $RBAC_Response; return $RBAC_Response;
} }
$RBAC->requirePermissions( 'PM_SETUP' );
$G_PUBLISH = new Publisher(); $G_PUBLISH = new Publisher();
G::LoadClass( 'configuration' ); G::LoadClass( 'configuration' );

View File

@@ -23,6 +23,8 @@
*/ */
//$oHeadPublisher = & headPublisher::getSingleton(); //$oHeadPublisher = & headPublisher::getSingleton();
global $RBAC;
$RBAC->requirePermissions( 'PM_FACTORY' );
G::loadClass( 'configuration' ); G::loadClass( 'configuration' );
$conf = new Configurations(); $conf = new Configurations();

View File

@@ -1,4 +1,6 @@
<?php <?php
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
// header('Pragma: no-cache'); // header('Pragma: no-cache');
// header('Cache-Control: no-store, no-cache, must-revalidate'); // header('Cache-Control: no-store, no-cache, must-revalidate');

View File

@@ -21,6 +21,8 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/ */
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript( 'setup/clearCompiled', true ); //adding a javascript file .js $oHeadPublisher->addExtJsScript( 'setup/clearCompiled', true ); //adding a javascript file .js

View File

@@ -1,4 +1,7 @@
<?php <?php
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
G::loadClass( 'configuration' ); G::loadClass( 'configuration' );
$c = new Configurations(); $c = new Configurations();
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();

View File

@@ -21,6 +21,9 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/ */
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
G::loadClass( 'configuration' ); G::loadClass( 'configuration' );
$oConf = new Configurations(); $oConf = new Configurations();

View File

@@ -21,6 +21,8 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/ */
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
$headPublisher = & headPublisher::getSingleton(); $headPublisher = & headPublisher::getSingleton();
$headPublisher->addExtJsScript( 'setup/pluginsMain', false ); $headPublisher->addExtJsScript( 'setup/pluginsMain', false );

View File

@@ -21,6 +21,9 @@
* For more information, contact Colosa Inc, 2566 Le Jeune Rd., * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com. * Coral Gables, FL, 33134, USA, or email info@colosa.com.
*/ */
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
$oHeadPublisher = & headPublisher::getSingleton(); $oHeadPublisher = & headPublisher::getSingleton();
G::LoadClass( 'serverConfiguration' ); G::LoadClass( 'serverConfiguration' );
$oServerConf = & serverConf::getSingleton(); $oServerConf = & serverConf::getSingleton();

View File

@@ -1,4 +1,7 @@
<?php <?php
global $RBAC;
$RBAC->requirePermissions( 'PM_SETUP' );
$option = (isset($_GET["option"]))? $_GET["option"] : null; $option = (isset($_GET["option"]))? $_GET["option"] : null;
switch ($option) { switch ($option) {