1
0
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:
Dasc3er 2020-12-14 11:05:17 +01:00
parent bad1886991
commit eba299658c
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;