diff options
author | Andreas Gohr <andi@splitbrain.org> | 2021-12-17 22:32:51 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2021-12-17 22:32:51 +0100 |
commit | ecad51dd492a107c65ae1265bcca591769433e6c (patch) | |
tree | 56f4c96b839030c8995f3400055265c379347647 | |
parent | e6699927414e1778fc6313d97c88e92762b61fec (diff) | |
download | dokuwiki-ecad51dd492a107c65ae1265bcca591769433e6c.tar.gz dokuwiki-ecad51dd492a107c65ae1265bcca591769433e6c.zip |
fix handling of loading auth backend
When a non existing auth backend was configured, the action router ran
into an infinie loop exception. The reason was that the denied action
required a configured auth system, but denying access should always
work.
Interestingly the problem did not occur when the auth backend signalled
a failure to load. This was because the auth backend was not properly
deinitialized. This is now done.
To aid debugging similar problems, fatal errors are now logged through
the logging mechanism in the action router
-rw-r--r-- | inc/Action/Denied.php | 2 | ||||
-rw-r--r-- | inc/ActionRouter.php | 1 | ||||
-rw-r--r-- | inc/auth.php | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/inc/Action/Denied.php b/inc/Action/Denied.php index 794fe0c0f..8acc918a1 100644 --- a/inc/Action/Denied.php +++ b/inc/Action/Denied.php @@ -11,7 +11,7 @@ use dokuwiki\Ui; * * @package dokuwiki\Action */ -class Denied extends AbstractAclAction +class Denied extends AbstractAction { /** @inheritdoc */ public function minimumPermission() diff --git a/inc/ActionRouter.php b/inc/ActionRouter.php index 7d8a72acf..300a56cd0 100644 --- a/inc/ActionRouter.php +++ b/inc/ActionRouter.php @@ -156,6 +156,7 @@ class ActionRouter { if(defined('DOKU_UNITTEST')) { throw $e; } + ErrorHandler::logException($e); $msg = 'Something unforeseen has happened: ' . $e->getMessage(); nice_die(hsc($msg)); } diff --git a/inc/auth.php b/inc/auth.php index bb0ad57dc..d6f1be215 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -56,7 +56,7 @@ function auth_setup() { if ($auth->success == false) { // degrade to unauthenticated user - unset($auth); + $auth = null; auth_logoff(); msg($lang['authtempfail'], -1); return false; |