aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/plupload/plupload.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2015-03-15 15:44:54 -0700
committerCesar G <prototech91@gmail.com>2015-03-15 16:06:35 -0700
commit7f7d8d91014294325d63bc9ef41c6b162578d98e (patch)
treec41c1647f2b0625533a13a9948b80481c5001694 /phpBB/phpbb/plupload/plupload.php
parentfaf267c41940d61100a13d52677a6396ae2b86b8 (diff)
downloadforums-7f7d8d91014294325d63bc9ef41c6b162578d98e.tar
forums-7f7d8d91014294325d63bc9ef41c6b162578d98e.tar.gz
forums-7f7d8d91014294325d63bc9ef41c6b162578d98e.tar.bz2
forums-7f7d8d91014294325d63bc9ef41c6b162578d98e.tar.xz
forums-7f7d8d91014294325d63bc9ef41c6b162578d98e.zip
[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
Diffstat (limited to 'phpBB/phpbb/plupload/plupload.php')
-rw-r--r--phpBB/phpbb/plupload/plupload.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index 3c686a552f..fcce5b3bd8 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -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');
}