mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Validating $_FILES in Image::loadUploadedImage() (Original patch was applied to Upload->validate() in trunk - r73254)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.2@73295 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5f13d417ac
commit
e9217a7c1d
@ -127,6 +127,11 @@ class Image extends File {
|
||||
return;
|
||||
}
|
||||
|
||||
if(isset($tmpFile['tmp_name']) && !is_uploaded_file($tmpFile['tmp_name'])) {
|
||||
user_error("Image::loadUploadedImage() Image file is not a valid upload", E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
$base = dirname(dirname($_SERVER['SCRIPT_FILENAME']));
|
||||
$class = $this->class;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user