What is "$ _FILES Corruption Attack"

I came across the following piece of code for checking uploaded files here: http://php.net/manual/en/features.file-upload.php

// Undefined | Multiple Files | $_FILES Corruption Attack
// If this request falls under any of them, treat it invalid.
if (
    !isset($_FILES['upfile']['error']) ||
    is_array($_FILES['upfile']['error'])
) {

      

But what is "$ _FILES Corruption Attack"?
(How) does the mentioned Code prevent it?
How can I change it if I want to include multiple downloads?

+3
php


source to share


No one has answered this question yet

Check out similar questions:

4270
Link. What does this symbol mean in PHP?
1065
Link. What does this error mean in PHP?
1004
What is stdClass in PHP?
944
What are Long-Polling, Websockets, Server-Sent Events (SSE), and Comet?
923
What is the difference between public, private and protected?
31
PHP - empty $ _POST and $ _FILES - when uploading large files
3
cannot get multiple uploaded files from $ _FILES in php
1
how to check the mime type provided by $ _FILES ['userfile'] ['type']
0
Discard an item from the $ _FILES upload array
-1
Error loading PHP file with array length 0.



All Articles
Loading...
X
Show
Funny
Dev
Pics