Fix #1274 check chunked uploads after all chunks are ready

This commit is contained in:
Kijin Sung 2020-04-16 18:17:04 +09:00
parent 2284fb7128
commit b193ad73e3
2 changed files with 10 additions and 0 deletions

View file

@ -113,6 +113,10 @@ class fileController extends file
$this->add('chunk_uploaded_size', $chunk_start + $chunk_size);
if ($chunk_start + $chunk_size == $total_size)
{
if (!Rhymix\Framework\Filters\FileContentFilter::check($temp_filename, $file_info['name']))
{
throw new Rhymix\Framework\Exception('msg_security_violation');
}
$file_info['tmp_name'] = $temp_filename;
$file_info['size'] = Rhymix\Framework\Storage::getSize($temp_filename);
}