CWRUChielLab / CASAuth

A modified version of the CASAuth plugin found here: http://www.mediawiki.org/wiki/Extension:CASAuthentication
11 stars 5 forks source link

User can't login through CAS if he doesn't exist on mediawiki already #12

Open Emi94 opened 3 years ago

Emi94 commented 3 years ago

If a user logins through CAS for the first time and he doesn't already has a user on mediawiki the web UI throws this: Fatal exception of type "Error"

And apache2 logs show this

[Wed Feb 10 07:33:29.602817 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_set_save_handler(): Cannot change save handler when session is active in /var/www/html/extensions/CASAuth/CAS/source/CAS/Client.php on line 1116
[Wed Feb 10 07:33:29.688588 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/html/extensions/CASAuth/CASAuth.php on line 231
[Wed Feb 10 07:33:29.726882 2021] [php7:warn] [pid 1687451] [client 192.168.0.100:41382] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/html/extensions/CASAuth/CASAuth.php on line 244
[Wed Feb 10 07:33:29.823279 2021] [php7:warn] [pid 1687449] [client 192.168.0.100:41388] PHP Warning:  session_set_save_handler(): Cannot change save handler when session is active in /var/www/html/extensions/CASAuth/CAS/source/CAS/Client.php on line 1116

Note: Mediawiki version is 1.35.0, php is 7.4 and $CASAuth["CreateAccounts"]=true; is set

tpokorra commented 2 years ago

I got this error message, not sure if it is the same underlying problem as you have got:

/index.php?title=Spezial:Anmelden&returnto=Hauptseite Error from line 151 of [...]/mediawiki-1.35/extensions/CASAuth/CASAuth.php: Call to undefined method User::setPassword()

see https://www.mediawiki.org/wiki/Release_notes/1.35, look for setPassword: User::setInternalPassword() and User::setPassword(), deprecated in 1.27, have been removed. Use User::changeAuthenticationData() instead.

For an example of replacement see this commit: https://github.com/wikimedia/mediawiki/commit/6edc28d601de3afab46bfbc01c83b0ad60680adf