aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-18 17:02:46 -0700
committerredmatrix <git@macgirvin.com>2016-05-18 17:02:46 -0700
commit37d14f3a1dbc8b4fea6831585c746be4a6602fcb (patch)
tree0b57a277c938b5972ccb00227ebbb636c8a07f45
parent166d63ff608c94152ce7213472fac6a2b61fa913 (diff)
downloadvolse-hubzilla-37d14f3a1dbc8b4fea6831585c746be4a6602fcb.tar.gz
volse-hubzilla-37d14f3a1dbc8b4fea6831585c746be4a6602fcb.tar.bz2
volse-hubzilla-37d14f3a1dbc8b4fea6831585c746be4a6602fcb.zip
Revert "yet more session work"
This reverts commit 51edd472c2e007490bdad3198ba1b2a3d7a09c45.
-rw-r--r--Zotlabs/Storage/BasicAuth.php24
-rw-r--r--Zotlabs/Web/Session.php4
2 files changed, 5 insertions, 23 deletions
diff --git a/Zotlabs/Storage/BasicAuth.php b/Zotlabs/Storage/BasicAuth.php
index 02c4117da..da5af7659 100644
--- a/Zotlabs/Storage/BasicAuth.php
+++ b/Zotlabs/Storage/BasicAuth.php
@@ -73,9 +73,6 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic {
protected $timezone = '';
- public $module_disabled = false;
-
-
/**
* @brief Validates a username and password.
*
@@ -95,7 +92,7 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic {
intval($record['account_id']),
intval($record['account_default_channel'])
);
- if($r && $this->check_module_access($r[0]['channel_id'])) {
+ if ($r) {
return $this->setAuthenticated($r[0]);
}
}
@@ -112,17 +109,13 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic {
if ((($record['account_flags'] == ACCOUNT_OK) || ($record['account_flags'] == ACCOUNT_UNVERIFIED))
&& (hash('whirlpool', $record['account_salt'] . $password) === $record['account_password'])) {
logger('password verified for ' . $username);
- if($this->check_module_access($r[0]['channel_id']))
- return $this->setAuthenticated($r[0]);
+ return $this->setAuthenticated($r[0]);
}
}
}
}
- if($this->module_disabled)
- $error = 'module not enabled for ' . $username;
- else
- $error = 'password failed for ' . $username;
+ $error = 'password failed for ' . $username;
logger($error);
log_failed_login($error);
@@ -146,17 +139,6 @@ class BasicAuth extends DAV\Auth\Backend\AbstractBasic {
return true;
}
- protected function check_module_access($channel_id) {
- if($channel_id && \App::$module === 'cdav') {
- $x = get_pconfig($channel_id,'cdav','enabled');
- if(! $x) {
- $this->module_disabled = true;
- return false;
- }
- }
- return true;
- }
-
/**
* Sets the channel_name from the currently logged-in channel.
*
diff --git a/Zotlabs/Web/Session.php b/Zotlabs/Web/Session.php
index c26b3523c..b1f5526ea 100644
--- a/Zotlabs/Web/Session.php
+++ b/Zotlabs/Web/Session.php
@@ -13,8 +13,8 @@ namespace Zotlabs\Web;
class Session {
- private $handler = null;
- private $session_started = false;
+ static private $handler = null;
+ static private $session_started = false;
public function init() {