aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-10 18:11:15 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-10 18:11:15 -0700
commitbc1b7afc857aedb11264b3c2f1cad688894b3853 (patch)
tree8b97758c39bd72df8888202e404d83c9fcc21146 /mod
parenta14d2de1f0cb20f73d332f1df8c6437bbab5aec7 (diff)
downloadvolse-hubzilla-bc1b7afc857aedb11264b3c2f1cad688894b3853.tar.gz
volse-hubzilla-bc1b7afc857aedb11264b3c2f1cad688894b3853.tar.bz2
volse-hubzilla-bc1b7afc857aedb11264b3c2f1cad688894b3853.zip
start to partition the dav
Diffstat (limited to 'mod')
-rw-r--r--mod/cloud.php31
-rw-r--r--mod/dav.php4
2 files changed, 5 insertions, 30 deletions
diff --git a/mod/cloud.php b/mod/cloud.php
index defdc3451..7f6dc0962 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -7,35 +7,17 @@
*/
use Sabre\DAV;
-use Hubzilla\RedDAV;
+use RedMatrix\RedDAV;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
-// workaround for HTTP-auth in CGI mode
-if (x($_SERVER, 'REDIRECT_REMOTE_USER')) {
- $userpass = base64_decode(substr($_SERVER["REDIRECT_REMOTE_USER"], 6)) ;
- if(strlen($userpass)) {
- list($name, $password) = explode(':', $userpass);
- $_SERVER['PHP_AUTH_USER'] = $name;
- $_SERVER['PHP_AUTH_PW'] = $password;
- }
-}
-
-if (x($_SERVER, 'HTTP_AUTHORIZATION')) {
- $userpass = base64_decode(substr($_SERVER["HTTP_AUTHORIZATION"], 6)) ;
- if(strlen($userpass)) {
- list($name, $password) = explode(':', $userpass);
- $_SERVER['PHP_AUTH_USER'] = $name;
- $_SERVER['PHP_AUTH_PW'] = $password;
- }
-}
-
/**
* @brief Fires up the SabreDAV server.
*
* @param App &$a
*/
+
function cloud_init(&$a) {
require_once('include/reddav.php');
@@ -116,13 +98,8 @@ function cloud_init(&$a) {
}
if ((! $auth->observer) && (! $isapublic_file) && (! $davguest)) {
- try {
- $auth->Authenticate($server, t('$Projectname - Guests: Username: {your email address}, Password: +++'));
- }
- catch (Exception $e) {
- logger('mod_cloud: auth exception' . $e->getMessage());
- http_status_exit($e->getHTTPCode(), $e->getMessage());
- }
+ logger('mod_cloud: auth exception');
+ http_status_exit(401, 'Permission denied.');
}
require_once('include/RedDAV/RedBrowser.php');
diff --git a/mod/dav.php b/mod/dav.php
index 2321aec75..d4695a544 100644
--- a/mod/dav.php
+++ b/mod/dav.php
@@ -7,7 +7,7 @@
*/
use Sabre\DAV;
-use Hubzilla\RedDAV;
+use RedMatrix\RedDAV;
// composer autoloader for SabreDAV
require_once('vendor/autoload.php');
@@ -131,8 +131,6 @@ function dav_init(&$a) {
$browser = new RedDAV\RedBrowser($auth);
$auth->setBrowserPlugin($browser);
- $server->addPlugin($browser);
-
// Experimental QuotaPlugin
// require_once('include/RedDAV/QuotaPlugin.php');
// $server->addPlugin(new RedDAV\QuotaPlugin($auth));