mirror of
https://github.com/devcode-it/openstamanager.git
synced 2024-12-28 08:40:41 +01:00
Fix potenziale #912
This commit is contained in:
parent
bad1886991
commit
eba299658c
@ -70,7 +70,7 @@ class Upload extends Model
|
||||
// Creazione file fisico
|
||||
directory($directory);
|
||||
if (
|
||||
(is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_array($source) && is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_string($source) && !copy($source, $directory.'/'.$filename))
|
||||
) {
|
||||
return null;
|
||||
|
@ -117,7 +117,7 @@ class Uploads
|
||||
// Creazione file fisico
|
||||
if (
|
||||
!directory($directory) ||
|
||||
(is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_array($source) && is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_string($source) && !copy($source, $directory.'/'.$filename))
|
||||
) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user