From 5ed4ed2246233d7e5c0a1136824a94e864420911 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 23 Jul 2017 19:54:32 -0700 Subject: suppress fopen errors from dav --- Zotlabs/Storage/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 1475241ab..7a102134f 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -265,7 +265,7 @@ class File extends DAV\Node implements DAV\IFile { $f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $x; else $f = $x; - return fopen($f, 'rb'); + return @fopen($f, 'rb'); } return dbunescbin($r[0]['content']); } -- cgit v1.2.3 From 8161ec88e5a2b9d1f7071dfed6a70c850e42ed4b Mon Sep 17 00:00:00 2001 From: git-marijus Date: Sat, 29 Jul 2017 23:32:48 +0200 Subject: implement file notification on initial upload and rename get_parent_cloudpath() to get_cloud_url() which now includes the filename --- Zotlabs/Storage/Browser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 3af9fcab1..9b7e9ad8e 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -347,7 +347,8 @@ class Browser extends DAV\Browser\Plugin { '$return_url' => \App::$cmd, '$path' => $path, '$folder' => find_folder_hash_by_path($this->auth->owner_id, $path), - '$dragdroptext' => t('Drop files here to immediately upload') + '$dragdroptext' => t('Drop files here to immediately upload'), + '$notify' => ['notify', t('Show in your contacts shared folder'), 0, '', [t('No'), t('Yes')]] )); } -- cgit v1.2.3 From 0e3b5536e2a576c3959bf6644103c7a676684024 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 10 Aug 2017 21:58:44 +0200 Subject: create cdav principal also on client access and remove redundant pconfig check in authentication process --- Zotlabs/Storage/BasicAuth.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/BasicAuth.php b/Zotlabs/Storage/BasicAuth.php index 0ff9fad13..ad2582bb2 100644 --- a/Zotlabs/Storage/BasicAuth.php +++ b/Zotlabs/Storage/BasicAuth.php @@ -188,13 +188,10 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic { protected function check_module_access($channel_id) { if($channel_id && \App::$module === 'cdav') { - $x = get_pconfig($channel_id,'cdav','enabled'); - if(! $x) { - $this->module_disabled = true; - return false; - } + return true; } - return true; + $this->module_disabled = true; + return false; } /** -- cgit v1.2.3 From 691fadc93d57efe364457b07c579b0c036176e09 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 17 Aug 2017 22:17:59 -0700 Subject: hubzilla issue #846 --- Zotlabs/Storage/BasicAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/BasicAuth.php b/Zotlabs/Storage/BasicAuth.php index ad2582bb2..d8af03703 100644 --- a/Zotlabs/Storage/BasicAuth.php +++ b/Zotlabs/Storage/BasicAuth.php @@ -187,7 +187,7 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic { } protected function check_module_access($channel_id) { - if($channel_id && \App::$module === 'cdav') { + if($channel_id && in_array(\App::$module,[ 'dav', 'cdav', 'snap'] )) { return true; } $this->module_disabled = true; -- cgit v1.2.3 From 2cce599fd7c45c1f2c3480eeb4e60d99d10d2ea2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 5 Sep 2017 21:38:07 -0700 Subject: check code rights on cloud files --- Zotlabs/Storage/File.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/File.php b/Zotlabs/Storage/File.php index 7a102134f..332bf6896 100644 --- a/Zotlabs/Storage/File.php +++ b/Zotlabs/Storage/File.php @@ -254,7 +254,7 @@ class File extends DAV\Node implements DAV\IFile { // @todo this should be a global definition $unsafe_types = array('text/html', 'text/css', 'application/javascript'); - if (in_array($r[0]['filetype'], $unsafe_types)) { + if (in_array($r[0]['filetype'], $unsafe_types) && (! channel_codeallowed($this->data['uid']))) { header('Content-disposition: attachment; filename="' . $r[0]['filename'] . '"'); header('Content-type: text/plain'); } @@ -300,7 +300,7 @@ class File extends DAV\Node implements DAV\IFile { public function getContentType() { // @todo this should be a global definition. $unsafe_types = array('text/html', 'text/css', 'application/javascript'); - if (in_array($this->data['filetype'], $unsafe_types)) { + if (in_array($this->data['filetype'], $unsafe_types) && (! channel_codeallowed($this->data['uid']))) { return 'text/plain'; } return $this->data['filetype']; -- cgit v1.2.3 From cc1ffff7cdfe5881636b6d2de3fe16f0094b5d69 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 9 Oct 2017 21:22:57 +0200 Subject: feed untranslated appnames to nav_set_selected() and query for the active app directly to get app details --- Zotlabs/Storage/Browser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Storage') diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index 9b7e9ad8e..6f6f4a292 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -244,7 +244,7 @@ class Browser extends DAV\Browser\Plugin { $a = false; - nav_set_selected(t('Files')); + nav_set_selected('Files'); \App::$page['content'] = $html; load_pdl(); -- cgit v1.2.3