aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Storage
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-06 19:59:07 -0700
committerzotlabs <mike@macgirvin.com>2017-09-06 19:59:07 -0700
commit5877e28d729489a9ba75397bcbe86c8a811c87e8 (patch)
tree9164526f92eac5f345fd96c8c2d8291aad4496e6 /Zotlabs/Storage
parent9ca7cc565b1821c3f121e568b59bdebe8899eed8 (diff)
parent643f515eaf21c05e03f0f51a332c18e0acdc403d (diff)
downloadvolse-hubzilla-5877e28d729489a9ba75397bcbe86c8a811c87e8.tar.gz
volse-hubzilla-5877e28d729489a9ba75397bcbe86c8a811c87e8.tar.bz2
volse-hubzilla-5877e28d729489a9ba75397bcbe86c8a811c87e8.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r--Zotlabs/Storage/File.php4
1 files changed, 2 insertions, 2 deletions
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'];