phpBMS

Show
Ignore:
Timestamp:
01/01/10 23:10:02 (2 years ago)
Author:
brieb
Message:
  • Fixed several SQL injection vulnerabilities
  • Fixed several XSS vulnerabilities due to PHP_SELF and REQUREST_URI
  • Fixed severa path disclosure errors
Files:
1 modified

Legend:

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

    r703 r704  
    1 <?php  
     1<?php 
    22/* 
    33 $Rev: 186 $ | $LastChangedBy: brieb $ 
     
    4343require_once("include/myaccount.php"); 
    4444 
     45$user = new myAccount($db, $_SESSION["userinfo"]["uuid"]); 
     46 
     47if(isset($_POST["command"])){ 
     48 
     49    switch($_POST["command"]){ 
     50 
     51        case "Change Password": 
     52 
     53            if($_POST["newPass"] === $_POST["confirmPass"]) 
     54                $statusmessage = $user->changePassword($_POST["curPass"], $_POST["newPass"]); 
     55            else 
     56                $statusmessage = "New password not confirmed"; 
     57            break; 
     58 
     59        case "Update Contact": 
     60 
     61            $statusmessage = $user->update($_POST); 
     62            break; 
     63 
     64    }//endswitch 
     65 
     66}//endif 
     67 
    4568$pageTitle="My Account"; 
    4669 
     
    5780                $theinput = new inputField("phone",$_SESSION["userinfo"]["phone"],"phone/extension",false,"phone",32,64); 
    5881                $theform->addField($theinput); 
    59                                  
     82 
    6083                $theform->jsMerge(); 
    6184                //============================================================== 
    62                 //End Form Elements      
    63          
     85                //End Form Elements 
     86 
    6487        include("header.php"); 
    6588?><div class="bodyline"> 
    66         <form action="<?php echo $_SERVER["PHP_SELF"]?>" method="post" name="record" id="record" onsubmit="return false"> 
     89        <form action="<?php echo htmlentities($_SERVER["PHP_SELF"])?>" method="post" name="record" id="record" onsubmit="return false"> 
    6790        <input type="hidden" id="command" name="command" value=""/> 
    68          
     91 
    6992        <h1><span><?php echo $pageTitle ?></span></h1> 
    7093 
     
    7396                <p id="nameP"><?php echo htmlQuotes($_SESSION["userinfo"]["firstname"]." ".$_SESSION["userinfo"]["lastname"])?></p> 
    7497        </fieldset> 
    75          
     98 
    7699        <fieldset> 
    77100                <legend>Change Password</legend> 
     
    80103                        <input type="password" id="curPass" name="curPass" maxlength="32"/> 
    81104                </p> 
    82                  
     105 
    83106                <p> 
    84107                        <label for="newPass">new password</label><br /> 
     
    93116                <button type="button" class="Buttons" onclick="changePass()">Change Password</button> 
    94117        </p> 
    95          
     118 
    96119        <fieldset> 
    97120                <legend>Contact Information</legend> 
    98121 
    99122                        <p><?php $theform->showField("email")?></p> 
    100                          
     123 
    101124                        <p><?php $theform->showField("phone")?></p> 
    102125 
    103126        </fieldset> 
    104127        <p><button type="button" class="Buttons" onclick="changeContact()">Update Contact Information</button></p> 
    105          
     128 
    106129        <fieldset> 
    107130                <legend>Access / Assigned Roles</legend> 
    108131                <ul> 
    109                 <?php  
     132                <?php 
    110133                        if($_SESSION["userinfo"]["admin"]) {?><li><strong>Administrator</strong></li><?php } 
    111                         displayRoles($db) 
     134                        $user->displayRoles(); 
    112135                ?></ul> 
    113136        </fieldset> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.