seems you can't easily have a blank password for DAV guests, so the guest password is now +++

This commit is contained in:
friendica 2014-01-21 20:42:10 -08:00
parent c41d3b2d53
commit a13393fb23
2 changed files with 10 additions and 2 deletions

View File

@ -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']) {

View File

@ -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);