diff options
author | mrjive <mrjive@mrjive.it> | 2015-09-22 13:11:54 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-09-22 13:11:54 +0200 |
commit | 5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d (patch) | |
tree | ece0274497ae0f3bc427cfa6e8f10752dd9934dc /mod/cloud.php | |
parent | 49d11ed9f88531bcd03f2f129230b0352014c22c (diff) | |
parent | 4b13f0e025b08263d7231845bc76034d9adc7847 (diff) | |
download | volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.gz volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.tar.bz2 volse-hubzilla-5ec3d3e36d8bb7918b844b4ebbeb878c4b45e30d.zip |
Merge pull request #3 from redmatrix/master
updating from original codebase
Diffstat (limited to 'mod/cloud.php')
-rw-r--r-- | mod/cloud.php | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/mod/cloud.php b/mod/cloud.php index 7f6dc0962..efb33f935 100644 --- a/mod/cloud.php +++ b/mod/cloud.php @@ -73,6 +73,8 @@ function cloud_init(&$a) { $server->addPlugin($lockPlugin); +/* This next bit should no longer be needed... */ + // The next section of code allows us to bypass prompting for http-auth if a // FILE is being accessed anonymously and permissions allow this. This way // one can create hotlinks to public media files in their cloud and anonymous @@ -83,24 +85,24 @@ function cloud_init(&$a) { // In order to avoid prompting for passwords for viewing a DIRECTORY, add // the URL query parameter 'davguest=1'. - $isapublic_file = false; - $davguest = ((x($_SESSION, 'davguest')) ? true : false); - - if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) { - try { - $x = RedFileData('/' . $a->cmd, $auth); - if($x instanceof RedDAV\RedFile) - $isapublic_file = true; - } - catch (Exception $e) { - $isapublic_file = false; - } - } - - if ((! $auth->observer) && (! $isapublic_file) && (! $davguest)) { - logger('mod_cloud: auth exception'); - http_status_exit(401, 'Permission denied.'); - } +// $isapublic_file = false; +// $davguest = ((x($_SESSION, 'davguest')) ? true : false); + +// if ((! $auth->observer) && ($_SERVER['REQUEST_METHOD'] === 'GET')) { +// try { +// $x = RedFileData('/' . $a->cmd, $auth); +// if($x instanceof RedDAV\RedFile) +// $isapublic_file = true; +// } +// catch (Exception $e) { +// $isapublic_file = false; +// } +// } + +// if ((! $auth->observer) && (! $isapublic_file) && (! $davguest)) { +// logger('mod_cloud: auth exception'); +// http_status_exit(401, 'Permission denied.'); +// } require_once('include/RedDAV/RedBrowser.php'); // provide a directory view for the cloud in Hubzilla |