The timeout system preference works fine, until I try to define the timeout in days ( e.g. '1d', or '3d' ). Once I have done so, I cannot change it to anything else. I get an error message from the pref system that says I'm logged out and need to log back in. If I click a link, I'm brought to the login page. If I log back in and try to modify the preference, I will get another 'not logged in' message and will start the loop all over again. If I edit the db row directly and change the value back to an integer, everything goes back to normal. I can modify the pref as much as I want, as long as it is an integer. As soon as I use the 'd' option, everything goes haywire again. I noticed in the database, 'timeout' is set to 'Integer'. I tried changing it to 'free' but that did not make a difference. If I dump the value of $timeout in C4::Auth::checkauth, it appears to be correct, even when using the 'd' option, but I end up logged out every time.
Created attachment 12629 [details] [review] Proposed patch The use of 1d (=one day) in "timeout" syspref was only checked in normal authentication (Auth.pm checkauth), it was missing in check_api_auth() and check_cookie_auth(). I add a private method in Auth.pm : _timeout_syspref(). Test plan : - Set timeout syspref to 1d - Login in intranet (uses checkauth) - In header, use borrower auto-completion in "check out" (uses check_cookie_auth) - Go to Administration/System preferences, modify a syspref and save (check_api_auth)
Created attachment 12645 [details] [review] [SIGNED-OFF] Bug 8497: Strange behavior when modifying the timeout system preference Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested standard login, patron auto-complete, and system preferences.
(In reply to comment #2) > Created attachment 12645 [details] [review] > [SIGNED-OFF] Bug 8497: Strange behavior when modifying the timeout system > preference > > Signed-off-by: Owen Leonard <oleonard@myacpl.org> > > Tested standard login, patron auto-complete, and system preferences. passing QA, works as expected $ koha-qa.pl -c 1 testing 1 commit(s) (applied to commit 0a35b26) * dec46ae Bug 8497: Strange behavior when modifying the timeout system preference C4/Auth.pm * C4/Auth.pm OK
Patch pushed to master
Pushed to 3.8.x, will be in 3.8.6