phpBMS

Changeset 727 for trunk/phpbms/modules

Show
Ignore:
Timestamp:
01/07/10 11:16:05 (2 years ago)
Author:
brieb
Message:
  • Added more rights look ups to certain pages
  • Fixed several path disclosure errors
Location:
trunk/phpbms/modules
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/base/adminsettings_ajax.php

    r649 r727  
    9797 
    9898}//end class 
    99 /*--[Processing]-------------------------------------------------------------*/ 
    100 /*---------------------------------------------------------------------------*/ 
    101 if(!isset($_GET["m"])) 
    102     exit; 
    103 require_once("../../include/session.php"); 
    10499 
    105 $checkUpdate = new checkUpdate($db); 
    106 $response = array(); 
    107 if($checkUpdate->needUpdateCheck($_GET["m"])){ 
    108     $response = $checkUpdate->checkForUpdate(); 
    109 }else{ 
    110     $response["checked"] = false; 
    111     $response = json_encode($response); 
    112 }//end if 
    113100 
    114 echo $response; 
     101/** 
     102 * Processing ================================================================== 
     103 */ 
     104if(!isset($noOutput)){ 
     105 
     106    require_once("../../include/session.php"); 
     107 
     108    $db->errorFormat = "json"; 
     109 
     110    if(!isset($_GET["m"])) 
     111        $error = new appError(200, "invalid passed paramaters", "", true, true, "json"); 
     112 
     113    if(!$_SESSION["userinfo"]["admin"]) 
     114        $error = new appError(970, "no rights to function", "", true, true, "json"); 
     115 
     116    $checkUpdate = new checkUpdate($db); 
     117    $response = array(); 
     118 
     119    if($checkUpdate->needUpdateCheck($_GET["m"])) 
     120        $response = $checkUpdate->checkForUpdate(); 
     121    else{ 
     122        $response["checked"] = false; 
     123        $response = json_encode($response); 
     124    }//end if 
     125 
     126    echo $response; 
     127 
     128}//endif 
    115129?> 
  • trunk/phpbms/modules/base/files_addedit.php

    r703 r727  
    6060 
    6161        $therecord = $thetable->processAddEditPage(); 
     62 
     63        if(!hasRights($therecord["roleid"])) 
     64            goURL("../../noaccess.php"); 
    6265 
    6366        if(isset($therecord["phpbmsStatus"])) 
  • trunk/phpbms/modules/base/notes_addedit.php

    r703 r727  
    3737 +-------------------------------------------------------------------------+ 
    3838*/ 
    39 //var_dump($_POST); 
    40 //exit; 
     39 
    4140        require_once("../../include/session.php"); 
    4241        require_once("include/fields.php"); 
     
    5857        $thetable = new notes($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1", $backurl); 
    5958        $therecord = $thetable->processAddEditPage(); 
     59 
     60        if($therecord["private"] && $therecord["createdby"] != $_SESSION["userinfo"]["id"] && !$_SESSION["userinfo"]["admin"]) 
     61            goURL("../../noaccess.php"); 
    6062 
    6163        if(isset($therecord["phpbmsStatus"])) 
  • trunk/phpbms/modules/base/scheduler_delete_logs.php

    r485 r727  
    4848}//end class --cleanImports-- 
    4949 
    50 if(!isset($noProcess)){ 
    51         $clean = new cleanSysLog($db); 
    52         $clean->removeExcessLogs(); 
     50if(!isset($noOutput) && isset($db)){ 
     51 
     52    $clean = new cleanSysLog($db); 
     53    $clean->removeExcessLogs(); 
     54 
    5355}//end if 
    5456?> 
  • trunk/phpbms/modules/base/scheduler_delete_tempimport.php

    r485 r727  
    2929}//end class --cleanImports-- 
    3030 
    31 if(!isset($noProcess)){ 
    32         $clean = new cleanImports($db); 
    33         $clean->removeTempCSV(); 
     31if(!isset($noOutput) && isset($db)){ 
     32 
     33    $clean = new cleanImports($db); 
     34    $clean->removeTempCSV(); 
     35 
    3436}//end if 
    3537?> 
  • trunk/phpbms/modules/base/tabledefs_columns.php

    r704 r727  
    4747 
    4848        if(!isset($_GET["id"])) 
    49                 $error = new appError(-200, "Passed parameter missing", "Invalid request", true); 
     49                $error = new appError(200, "Passed parameter missing", "Invalid request", true); 
    5050 
    5151        $columns = new tableColumns($db, $_GET["id"]); 
  • trunk/phpbms/modules/base/tabledefs_custom.php

    r704 r727  
    4545        //Make sure table definition id is set 
    4646        if(!isset($_GET["id"])) 
    47             $error = new appError(300,"Passed variable not set (id)"); 
     47            $error = new appError(200,"Passed variable not set"); 
     48 
     49        if(!hasRights("Admin")) 
     50                goURL(APP_PATH."noaccess.php"); 
    4851 
    4952        $customFields = new customFields($db, ((int) $_GET["id"])); 
  • trunk/phpbms/modules/base/tabledefs_groupings.php

    r704 r727  
    4343        include("include/tablegroupings.php"); 
    4444 
     45        if(!hasRights("Admin")) 
     46                goURL(APP_PATH."noaccess.php"); 
     47 
     48        if(!isset($_GET["id"])) 
     49                $error = new appError(-200, "Passed parameter missing", "Invalid request", true); 
    4550 
    4651        //grab the table name 
  • trunk/phpbms/modules/base/tabledefs_options.php

    r704 r727  
    4444        if(!isset($_GET["id"])) 
    4545                $error = new appError(100, "Passed Parameter not present."); 
     46 
     47        if(!hasRights("Admin")) 
     48                goURL(APP_PATH."noaccess.php"); 
    4649 
    4750        $options = new tableOptions($db, $_GET["id"]); 
  • trunk/phpbms/modules/base/tabledefs_searchfields.php

    r704 r727  
    4242        include("include/tabledefs_searchfields_include.php"); 
    4343 
     44        if(!hasRights("Admin")) 
     45                goURL(APP_PATH."noaccess.php"); 
     46 
     47        if(!isset($_GET["id"])) 
     48                $error = new appError(-200, "Passed parameter missing", "Invalid request", true); 
    4449 
    4550        $searchfields = new tableSearchFields($db, $_GET["id"]); 
  • trunk/phpbms/modules/recurringinvoices/scheduler_recurr.php

    r722 r727  
    415415//PROCESSOR 
    416416//============================================================================================= 
    417 if(!isset($noProcess)){ 
     417if(!isset($noOutput)){ 
    418418        $recurr = new recurr($db); 
    419419        $invoiceArray = $recurr->getInvoicesToRepeat(); 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.