Ignore:
Timestamp:
10/03/2009 02:40:27 PM (3 years ago)
Author:
Acinonyx
Message:

[awmn] Fix unvalidated input of photos id which allows deletion of files from unprivileged users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/awmn/globals/classes/mysql.php

    r206 r213  
    2727        var $last_query; 
    2828        var $insert_id; 
     29        var $affected_rows; 
    2930        var $log=FALSE; 
    3031        var $logs_table=''; 
     
    5253        function query($query) { 
    5354                $this->insert_id = 0; 
     55                $this->affected_rows = 0; 
    5456                $this->last_query=$query; 
    5557                $this->total_queries += 1; 
     
    180182                $query = "DELETE FROM $table".($using==""?"":" USING $using").($where==""?"":" WHERE $where"); 
    181183                $res = $this->query_data($query); 
     184                if ($res === TRUE) $this->affected_rows = mysql_affected_rows($this->mysql_link); 
    182185                if ($addlog && isset($aff)) { 
    183186                        for ($i=0;$i<count($aff);$i++) { 
Note: See TracChangeset for help on using the changeset viewer.