phpBMS

Show
Ignore:
Timestamp:
12/30/09 14:17:21 (2 years ago)
Author:
nate
Message:
  • Added additional data check for api get requests.
  • The files's class getRecord no longer loads in the entire binary file into memory when the function is called. The function also returns a field named 'apifileurl' that gives the to get a file via an api login.
  • Added a file that serves a files record's file field using api login credentials posted to it.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/modules/api/include/apiclass.php

    r689 r691  
    598598                            $processor->timeFormat =  $this->options->timeFormat; 
    599599                        }//end if 
    600  
    601                         if(!$this->options->useUuid){ 
     600                         
     601                        $errorMessage = ""; 
     602                        if($this->options->useUuid){ 
     603                            if(!isset($request["data"]["uuid"])) 
     604                                $errorMessage = "The `uuid` field must be set."; 
     605                        }else{ 
     606                            if(!isset($request["data"]["id"])) 
     607                                $errorMessage = "The `id` field must be set."; 
     608                        }//end if 
     609                         
     610                        if($errorMessage) 
     611                            $this->sendError("Update failed from request number ".$i, $errorMessage); 
     612                        elseif(!$this->options->useUuid){ 
    602613                            $therecord = $processor->getRecord((int) $request["data"]["id"], $this->options->useUuid); 
    603614                            $thereturn = $therecord["id"]; 
     
    608619                            $thevalue = $request["data"]["uuid"]; 
    609620                        } 
    610  
    611621 
    612622                        if($thereturn == $thevalue) 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.