View Single Post
  #47  
Old 03-23-2012, 01:52 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 84,216
SilverDragonTears is on a distinguished road
Default

Do you have a fix for this code for 1.3?

Code:
function secure($data, $key = NULL) {
    //This function performs security checks on all incoming form data
    if ($key === 'orderaid')
    {
            //var_dump($data);    var_dump($key); die;
        foreach($data as $dataKey => $dataVal)
        {
            $data[$dataKey] = abs(intval($dataVal));
        }
            //var_dump($data);die;
        return $data;
    }    
    if(is_array($data)) {
        die("Hacking Attempt!");
    }   
    $data = htmlentities($data);
    $data = mysql_real_escape_string($data);
    $data = strip_tags($data, '');  
    if ($key === NULL)
    {
        return $data;
    }    
    $GLOBALS['_POST'][$key] = $data;
}
This does not work in 1.3
__________________

Check out SilvaTales
Reply With Quote