1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[ticket/13550] Check that the Plupload temp directory is writable before moving

This prevents a PHP warning from being issued that results in an invalid JSON
response being returned to the user.

PHPBB3-13550
This commit is contained in:
Cesar G 2015-03-15 15:44:54 -07:00
parent faf267c419
commit 7f7d8d9101

View File

@ -326,7 +326,7 @@ class plupload
$tmp_file = $this->temporary_filepath($upload['tmp_name']);
if (!move_uploaded_file($upload['tmp_name'], $tmp_file))
if (!phpbb_is_writable($this->temporary_directory) || !move_uploaded_file($upload['tmp_name'], $tmp_file))
{
$this->emit_error(103, 'PLUPLOAD_ERR_MOVE_UPLOADED');
}