cosmocode/dokuwiki-plugin-oauth

oauth plugin crashes DokuWiki with 500 after upgrade to rc2020-06-01 "Hogfather"

igittigitt opened this issue · 1 comments

Today i upgraded our Wiki instance using OAuth Plugin to login via Keycloak. After the Wiki-Update i can't access it anymore (error 500) and get this in my Apache2 errorlog:

[Mon Jun 01 17:50:46.485752 2020] [php7:error] [pid 25378] [client 10.32.216.23:62272] PHP Fatal error:  Uncaught Error: Call to undefined method auth_plugin_oauth::_loadUserData() in /systems/id-generator/htdocs/lib/plugins/oauth/auth.php:297\nStack trace:\n#0 /systems/id-generator/htdocs/lib/plugins/oauth/auth.php(226): auth_plugin_oauth->getUserByEmail('*********@m...')\n#1 /systems/id-generator/htdocs/lib/plugins/oauth/auth.php(195): auth_plugin_oauth->processUser(Array, 'Keycloak')\n#2 /systems/id-generator/htdocs/lib/plugins/oauth/auth.php(97): auth_plugin_oauth->processLogin(false, Object(OAuth\\Plugin\\KeycloakAdapter), 'Keycloak', '', Array)\n#3 /systems/id-generator/htdocs/inc/auth.php(105): auth_plugin_oauth->trustExternal('', '', false)\n#4 /systems/id-generator/htdocs/inc/init.php(229): auth_setup()\n#5 /systems/id-generator/htdocs/doku.php(36): require_once('/systems/id-gen...')\n#6 {main}\n  thrown in /systems/id-generator/htdocs/lib/plugins/oauth/auth.php on line 297

After a bit of research i found that the function _loadUserData() claimed above was renamed in the current Dokuwiki version to loadUserData() (without that underscore). The function is exported by the class file in lib/plugins/authplain/auth.php

To get it back to work, i renamed the call in the OAuth-Pluign file:

297c297
<         if($this->users === null) $this->_loadUserData();
---
>         if($this->users === null) $this->loadUserData();

Thank you for opening this issue.
CosmoCode is a software company in Berlin providing services for wiki, app and web development. As such we can't guarantee quick responses for issues opened on our Open Source projects.
If you require certain features or bugs fixed, you can always hire us. Feel free to contact us at dokuwiki@cosmocode.de for an offer.