aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-21 20:42:10 -0800
committerfriendica <info@friendica.com>2014-01-21 20:42:10 -0800
commita13393fb230f83cbb93ad36494ce337ef5c48ee0 (patch)
tree36141d367bc0e9b39dc7b3791e1e304fc05a0940
parentc41d3b2d5393de6ae810cd4518851d6d633be279 (diff)
downloadvolse-hubzilla-a13393fb230f83cbb93ad36494ce337ef5c48ee0.tar.gz
volse-hubzilla-a13393fb230f83cbb93ad36494ce337ef5c48ee0.tar.bz2
volse-hubzilla-a13393fb230f83cbb93ad36494ce337ef5c48ee0.zip
seems you can't easily have a blank password for DAV guests, so the guest password is now +++
-rw-r--r--include/reddav.php6
-rw-r--r--mod/cloud.php6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/reddav.php b/include/reddav.php
index daa7fd734..c5ef39097 100644
--- a/include/reddav.php
+++ b/include/reddav.php
@@ -745,6 +745,12 @@ class RedBasicAuth extends Sabre\DAV\Auth\Backend\AbstractBasic {
public $timezone;
protected function validateUserPass($username, $password) {
+
+ if(trim($password) === '+++') {
+ logger('reddav: validateUserPass: guest ' . $username);
+ return true;
+ }
+
require_once('include/auth.php');
$record = account_verify_password($email,$pass);
if($record && $record['account_default_channel']) {
diff --git a/mod/cloud.php b/mod/cloud.php
index 3332cf18c..de42249fe 100644
--- a/mod/cloud.php
+++ b/mod/cloud.php
@@ -85,12 +85,14 @@ function cloud_init(&$a) {
if(! $auth->observer) {
try {
- $auth->Authenticate($server,'Red Matrix');
+ $auth->Authenticate($server, t('Red Matrix - Guests: Username: {your email address}, Password: +++'));
}
catch ( Exception $e) {
-
+ logger('mod_cloud: auth exception' . $e->getMessage());
+ http_status_exit($e->getHTTPCode(),$e->getMessage());
}
}
+
// $browser = new DAV\Browser\Plugin();
$browser = new RedBrowser($auth);