Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 548f254

Browse files
author
Michael Grauer
committed
BUG: refs #0458. Added is_writable check to prevent breaking json parsing.
1 parent 400210b commit 548f254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/controllers/components/HttpuploadComponent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function generateToken($args, $dirname = '')
7474

7575
if(!file_exists($dir))
7676
{
77-
if(!mkdir($dir, 0700, true))
77+
if(!is_writable($dir) || !mkdir($dir, 0700, true))
7878
{
7979
throw new Exception('Failed to create temporary upload dir', MIDAS_HTTPUPLOAD_TMP_DIR_CREATION_FAILED);
8080
}

0 commit comments

Comments
 (0)