note 118430 added to function.is-uploaded-file

From: Date: Fri, 04 Dec 2015 15:42:16 +0000
Subject: note 118430 added to function.is-uploaded-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-204280@lists.php.net to get a copy of this message
To expand on what nicoSWD stated about this function. Any script working with the temporary file $_FILES[]['tmp_name'] should call this function. In any case where the script is modified to unlink(), rename() or otherwise modify the file that IS NOT move_uploaded_file() will not have the upload checked. Likewise, most file operations are cached in PHP, therefore there should be minimal performance hit running is_uploaded_file before move_uploaded_file, since it will usually used a cached result for the latter. The security benefits outweigh the microsecond difference in performance in any event, and should universally be used as soon as the $_FILES array is first entered into an application. While there may not be an immediate issue, code evolves and could quickly change this fact. ---- Server IP: 72.52.91.14 Probable Submitter: 4.30.168.120 ---- Manual Page -- http://php.net/manual/en/function.is-uploaded-file.php Edit -- https://master.php.net/note/edit/118430 Del: integrated -- https://master.php.net/note/delete/118430/integrated Del: useless -- https://master.php.net/note/delete/118430/useless Del: bad code -- https://master.php.net/note/delete/118430/bad+code Del: spam -- https://master.php.net/note/delete/118430/spam Del: non-english -- https://master.php.net/note/delete/118430/non-english Del: in docs -- https://master.php.net/note/delete/118430/in+docs Del: other reasons-- https://master.php.net/note/delete/118430 Reject -- https://master.php.net/note/reject/118430 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204280) next »