Bug 8497

Summary: Strange behavior when modifying the 'timeout' system preference.
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: System AdministrationAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Mason James <mtj>
Severity: critical    
Priority: P5 - low CC: chris, gmcharlt, mtj, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5998
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Proposed patch
[SIGNED-OFF] Bug 8497: Strange behavior when modifying the timeout system preference

Description Kyle M Hall (khall) 2012-07-24 12:44:48 UTC
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.
Comment 1 Fridolin Somers 2012-10-02 12:27:08 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2012-10-02 14:57:56 UTC
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.
Comment 3 Mason James 2012-10-03 01:03:58 UTC
(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
Comment 4 Paul Poulain 2012-10-05 14:50:48 UTC
Patch pushed to master
Comment 5 Chris Cormack 2012-10-06 07:04:55 UTC
Pushed to 3.8.x, will be in 3.8.6