aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-05 21:38:07 -0700
committerzotlabs <mike@macgirvin.com>2017-09-05 21:38:07 -0700
commit2cce599fd7c45c1f2c3480eeb4e60d99d10d2ea2 (patch)
tree6cf6d88406faa6303f72dd59c38b71cdff7bdb6b /Zotlabs/Module
parent7dc99cb4a4b3852e5c16ab71a7bac0e3dca1b2f4 (diff)
downloadvolse-hubzilla-2cce599fd7c45c1f2c3480eeb4e60d99d10d2ea2.tar.gz
volse-hubzilla-2cce599fd7c45c1f2c3480eeb4e60d99d10d2ea2.tar.bz2
volse-hubzilla-2cce599fd7c45c1f2c3480eeb4e60d99d10d2ea2.zip
check code rights on cloud files
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Attach.php2
-rw-r--r--Zotlabs/Module/Getfile.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Module/Attach.php b/Zotlabs/Module/Attach.php
index 94f46978a..490d5edd0 100644
--- a/Zotlabs/Module/Attach.php
+++ b/Zotlabs/Module/Attach.php
@@ -31,7 +31,7 @@ class Attach extends \Zotlabs\Web\Controller {
$unsafe_types = array('text/html','text/css','application/javascript');
- if(in_array($r['data']['filetype'],$unsafe_types)) {
+ if(in_array($r['data']['filetype'],$unsafe_types) && (! channel_codeallowed($r['data']['uid']))) {
header('Content-type: text/plain');
}
else {
diff --git a/Zotlabs/Module/Getfile.php b/Zotlabs/Module/Getfile.php
index 0b05d78a4..413a68e0c 100644
--- a/Zotlabs/Module/Getfile.php
+++ b/Zotlabs/Module/Getfile.php
@@ -108,7 +108,7 @@ class Getfile extends \Zotlabs\Web\Controller {
$unsafe_types = array('text/html','text/css','application/javascript');
- if(in_array($r['data']['filetype'],$unsafe_types)) {
+ if(in_array($r['data']['filetype'],$unsafe_types) && (! channel_codeallowed($channel['channel_id']))) {
header('Content-type: text/plain');
}
else {