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/mailchimp/report/client_mailchimp_export.php

    r703 r704  
    4949        function MCReport($db,$variables = NULL){ 
    5050                $this->db = $db; 
    51          
     51 
    5252                //next we do the columns 
    5353                $this->addColumn("Email","`email`");//0 
     
    5656                $this->addColumn("Company","`company`");//3 
    5757                $this->addColumn("Uuid","`uuid`");//4 
    58                  
     58 
    5959                $this->addColumn("Type","`type`");//5 
    6060                $this->addColumn("Id","`id`");//6 
    61                  
     61 
    6262 
    6363                if($variables){ 
     
    6868                                $this->selectcolumns[] = $this->columns[$id]; 
    6969                        $this->selectcolumns = array_reverse($this->selectcolumns); 
    70                          
     70 
    7171                        $this->selecttable = "`clients`"; 
    7272 
     
    7676                        if($this->whereclause!="") $this->whereclause=" WHERE (".substr($this->whereclause,6).") "; 
    7777                }// endif 
    78                  
     78 
    7979        }//end method 
    8080 
     
    8888                $this->columns[] = $temp; 
    8989        }//end method 
    90          
    91          
     90 
     91 
    9292        function generate(){ 
    93                  
     93 
    9494                $querystatement = "SELECT "; 
    9595                foreach($this->selectcolumns as $thecolumn) 
     
    9797                $querystatement = substr($querystatement, 0, -1); 
    9898                $querystatement .= " FROM ".$this->selecttable.$this->whereclause; 
    99                  
     99 
    100100                $queryresult = $this->db->query($querystatement); 
    101101 
    102102                $num_fields = $this->db->numFields($queryresult); 
    103                  
     103 
    104104                for($i=0;$i<$num_fields;$i++) 
    105105                        $this->reportOutput .= ",".$this->db->fieldName($queryresult, $i); 
     
    123123                $this->reportOutput = substr($this->reportOutput, 0, strlen($this->reportOutput)-1); 
    124124        } 
    125          
    126          
     125 
     126 
    127127        function output(){ 
    128                  
     128 
    129129                header("Content-type: text/plain"); 
    130130                header('Content-Disposition: attachment; filename="clients_mailchimp_export.csv"'); 
    131131 
    132132                echo $this->reportOutput; 
    133                  
     133 
    134134        }//end function --output-- 
    135          
     135 
    136136 
    137137        function showOptions($what){ 
     
    164164        <div class="bodyline"> 
    165165            <h1>Invoice Total Options</h1> 
    166             <form id="GroupForm" action="<?php echo $_SERVER["PHP_SELF"]?>" method="post" name="GroupForm"> 
     166            <form id="GroupForm" action="<?php echo htmlentities($_SERVER["PHP_SELF"])?>" method="post" name="GroupForm"> 
    167167 
    168168                <fieldset> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.