seems you can't easily have a blank password for DAV guests, so the guest password is now +++
This commit is contained in:
parent
c41d3b2d53
commit
a13393fb23
@ -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']) {
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user