Browse Source

Limit the maximum file size to the constant \PHP_INT_MAX

Visman 4 years ago
parent
commit
a6a6e6ec45
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/Core/Files.php

+ 1 - 0
app/Core/Files.php

@@ -827,6 +827,7 @@ class Files
     public function __construct(/* string|int */ $maxFileSize, /* string|int */ $maxImgSize)
     {
         $init = \min(
+            \PHP_INT_MAX,
             $this->size(\ini_get('upload_max_filesize')),
             $this->size(\ini_get('post_max_size'))
         );