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;
|
public $timezone;
|
||||||
|
|
||||||
protected function validateUserPass($username, $password) {
|
protected function validateUserPass($username, $password) {
|
||||||
|
|
||||||
|
if(trim($password) === '+++') {
|
||||||
|
logger('reddav: validateUserPass: guest ' . $username);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
require_once('include/auth.php');
|
require_once('include/auth.php');
|
||||||
$record = account_verify_password($email,$pass);
|
$record = account_verify_password($email,$pass);
|
||||||
if($record && $record['account_default_channel']) {
|
if($record && $record['account_default_channel']) {
|
||||||
|
@ -85,12 +85,14 @@ function cloud_init(&$a) {
|
|||||||
|
|
||||||
if(! $auth->observer) {
|
if(! $auth->observer) {
|
||||||
try {
|
try {
|
||||||
$auth->Authenticate($server,'Red Matrix');
|
$auth->Authenticate($server, t('Red Matrix - Guests: Username: {your email address}, Password: +++'));
|
||||||
}
|
}
|
||||||
catch ( Exception $e) {
|
catch ( Exception $e) {
|
||||||
|
logger('mod_cloud: auth exception' . $e->getMessage());
|
||||||
|
http_status_exit($e->getHTTPCode(),$e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// $browser = new DAV\Browser\Plugin();
|
// $browser = new DAV\Browser\Plugin();
|
||||||
|
|
||||||
$browser = new RedBrowser($auth);
|
$browser = new RedBrowser($auth);
|
||||||
|
Reference in New Issue
Block a user