aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/File_upload.php2
-rw-r--r--include/attach.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/File_upload.php b/Zotlabs/Module/File_upload.php
index 39a30cb1a..8956ce16f 100644
--- a/Zotlabs/Module/File_upload.php
+++ b/Zotlabs/Module/File_upload.php
@@ -35,7 +35,7 @@ class File_upload extends \Zotlabs\Web\Controller {
$_REQUEST['deny_cid'] = ((isset($_REQUEST['contact_deny'])) ? perms2str($_REQUEST['contact_deny']) : '');
$_REQUEST['deny_gid'] = ((isset($_REQUEST['group_deny'])) ? perms2str($_REQUEST['group_deny']) : '');
- if(isset($_REQUEST['filename']) && $_REQUEST['filename']) {
+ if(isset($_REQUEST['filename']) && strlen($_REQUEST['filename'])) {
$r = attach_mkdir($channel, get_observer_hash(), $_REQUEST);
if($r['success']) {
$hash = $r['data']['hash'];
diff --git a/include/attach.php b/include/attach.php
index ead5a8e06..3060295b9 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -1180,7 +1180,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
return $ret;
}
- if(! $arr['filename']) {
+ if(isset($arr['filename']) && !strlen($arr['filename'])) {
$ret['message'] = t('Empty pathname');
return $ret;
}