owncloud-archive / user_cas

Currently maintained in :
https://github.com/felixrupp/user_cas
10 stars 50 forks source link

Cas login but don't logout #43

Open nmd28 opened 6 years ago

nmd28 commented 6 years ago

Hi.

I successfully install the user_cas but while login out from owncloud, cas still in so when I try to login with another user, instead of seing the cas login page, i get back to the last user session and i can't find a setting to logout cas and ouwcloud at the same time. Don't know if it's clear, english's not my native language.

Thanks

felixrupp commented 6 years ago

Hi @nmd28 ,

actually there is an option in the user_cas Settings panel. Go to the OC Settings -> „Additional“:

There are the user_cas Settings: Tab: Basic: x Disable CAS logout (do only OwnCloud logout)

Uncheck this, then your CAS Session should be terminated.

Regards, Felix

nmd28 commented 6 years ago

Hi Felix, I uncheck this and nothing change. When a I logout and try to login with, I go back to the past user account.

felixrupp commented 6 years ago

Please provide some information regarding your setup again:

ownCloud, user_cas, php version.

Pleas also try to logout from your CAS instance manually and delete all cookies refering your CAS instance. After that, try again.

nmd28 commented 6 years ago

Setup : OC 9.1.7, php 7.1, user_cas 1.4, phpCAS 1.3.5. I can get back to my cas login page only if I logout manually.

felixrupp commented 6 years ago

Can you post the contents of your owncloud.log (regularly placed in your „data“-folder) file please, after you logged in and out one time?

Thanks

nmd28 commented 6 years ago

Hi Felix. Sorry for the late. Here it is :

{"reqId":"QbPY7TloqiIV0mrZqr13","remoteAddr":"ipAdresse"app":"PHP","message":"session_destroy(): Trying to destroy uninitialized session at /var/www/html/owncloud/apps/user_cas/vendor/jasig/phpcas/source/CAS/Client.php#3683","level":3,"time":"2018-01-16T14:42:34+00:00","method":"GET","url":"/owncloud/index.php/apps/user_cas/login?redirect_url=%2Fowncloud%2Findex.php%2Fapps%2Ffiles%2F%3Fdir%3D%2F%26fileid%3D25&ticket=ST-16-qjrVHX9MUANzIKwRWxrG-...............","user":"--"} {"reqId":"mFbCbVo1nr3YwWgV45yM","remoteAddr":"ipAdresse","app":"cas","message":"phpCAS user password has been checked.","level":3,"time":"2018-01-16T14:42:34+00:00","method":"GET","url":"/owncloud/index.php/apps/user_cas/login?redirect_url=%2Fowncloud%2Findex.php%2Fapps%2Ffiles%2F%3Fdir%3D%2F%26fileid%3D25","user":"--"} {"reqId":"uNZpRueaWue2fdplvaSR","remoteAddr":"ipAdresse","app":"cas","message":"phpCAS user password has been checked.","level":3,"time":"2018-01-16T14:42:34+00:00","method":"GET","url":"/owncloud/index.php/apps/files/?dir=/&fileid=25","user":"user"}

nmd28 commented 6 years ago

Hi. Seems like my problem is fix when I switched to OC 10. Thanks

felixrupp commented 6 years ago

Hi @nmd28

I have discovered a strange bug with session IDs an the phpCAS library which lies behind user_cas. The phpCAS library sometimes returns session IDs which are too long for PHP, an error is thrown then and you will not be logged out/in.

It may be the case that you had this problem with OC9, because In most of the cases the error appeared on OC9 only.

I'm glad it now works for you with OC10.