phpBMS

Changeset 370 for trunk/phpbms/include

Show
Ignore:
Timestamp:
12/03/07 10:26:25 (4 years ago)
Author:
brieb
Message:
  • Fixed colon substitution problem with invoice line items.
  • Attempted fix of escaping characters correctly.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/include/common_functions.php

    r369 r370  
    489489 
    490490function addSlashesToArray($thearray){ 
    491         if(get_magic_quotes_runtime() || get_magic_quotes_gpc()) 
     491 
     492        //This function prepares an array for SQL manipulation. 
     493         
     494        if(get_magic_quotes_runtime() || get_magic_quotes_gpc()){ 
     495         
    492496                foreach ($thearray as $key=>$value)  
    493497                        if(is_array($value)) 
    494498                                $thearray[$key]= addSlashesToArray($value); 
    495499                        else 
    496                                 $thearray[$key] = stripslashes($value); 
    497          
    498         foreach ($thearray as $key=>$value) 
    499                 if(!is_array($value)) 
    500                         $thearray[$key] = mysql_real_escape_string($value); 
     500                                $thearray[$key] = mysql_real_escape_string(stripslashes($value)); 
     501                                 
     502        } else   
     503                foreach ($thearray as $key=>$value) 
     504                        if(is_array($value)) 
     505                                $thearray[$key]= addSlashesToArray($value);                              
     506                        else 
     507                                $thearray[$key] = mysql_real_escape_string($value); 
    501508         
    502509        return $thearray; 
    503 } 
     510         
     511}//end function 
     512 
    504513 
    505514function htmlQuotes($string){ 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.