check code rights on cloud files

This commit is contained in:
zotlabs
2017-09-05 21:38:07 -07:00
parent 7dc99cb4a4
commit 2cce599fd7
3 changed files with 4 additions and 4 deletions

View File

@@ -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 {