[Bug 7810] New: C4/Auth.pm - on pack restart session is undefined
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Priority: P5 - low Change sponsored?: --- Bug ID: 7810 CC: dpavlin@rot13.org Assignee: gmcharlt@gmail.com Summary: C4/Auth.pm - on pack restart session is undefined QA Contact: koha.sekjal@gmail.com Severity: enhancement Classification: Unclassified OS: All Reporter: dpavlin@rot13.org Hardware: All Status: NEW Version: rel_3_8 Component: Authentication Product: Koha -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 8553 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8553&action=edit Bug 7810 - C4/Auth.pm - on pack restart session is undefined So we shouldn't try to delete it. This produces application error instead of redirection to login page. I had similar problems with CGI, especially when session in browser is still active, and one on filesystem or database is already expired. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Blocks| |7172 Assignee|gmcharlt@gmail.com |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|C4/Auth.pm - on pack |C4/Auth.pm - on plack |restart session is |restart session is |undefined |undefined -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Alex Arnaud <alex.arnaud@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex.arnaud@biblibre.com --- Comment #2 from Alex Arnaud <alex.arnaud@biblibre.com> --- Dobrica, what do you mean by "restart session"? Restart plack ? i did it but didn't get application error -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |INVALID --- Comment #3 from Dobrica Pavlinusic <dpavlin@rot13.org> --- My assumption was that it happends when browser still has cookie and session is already expired, but I'm unable to reproduce it fiddeling with session files manually. I will mark it INVALID and wait for it to happen again :-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff --- Comment #4 from Dobrica Pavlinusic <dpavlin@rot13.org> --- I got lucky (kind of). I restarted plack (using plackup only, not starman) and got following error on /cgi-bin/koha/mainpage.pl Can't call method "delete" on an undefined value at /srv/koha/C4/Auth.pm line 693, <DATA> line 522. at /srv/koha/mainpage.pl line 67 Since my patch fixes that line, I'm reopening the bug. Only way to recover from this error is to manually delete cookie which is not really good solution for users. My session looks very strange: dpavlin@koha-dev:/tmp$ sudo cat /tmp/cgisess_b77b83762178c18a0e7a3ac4f4e50738 --- _SESSION_ATIME: '1332851288' _SESSION_CTIME: '1332851288' _SESSION_ID: b77b83762178c18a0e7a3ac4f4e50738 _SESSION_REMOTE_ADDR: 193.198.212.4 and corrent time on system is: dpavlin@koha-dev:/tmp$ perl -e 'print time(),$/' 1332852562 My $timeout is 3600 which doesn't really explain why I end up in this code path since 1332852562 - 1332851288 = 1274 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 --- Comment #5 from Dobrica Pavlinusic <dpavlin@rot13.org> --- I can easily reproduce this bug by changing Koha site for plack using tools from Bug 7844 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 --- Comment #6 from Alex Arnaud <alex.arnaud@biblibre.com> --- Dobrica how can you do that. I start koha using your tools from Bug 7844. But i still can't reproduce the bug ... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 --- Comment #7 from Dobrica Pavlinusic <dpavlin@rot13.org> --- 1. start one site using plack ./opac-plack.sh site1 2. login into site1 http://koha-dev.example.com:5000/ 3. stop plack and start another site, start another site ./opac-plack.sh site2 4. reload page = bug Work-around this bug is to use wildcard DNS with something like *.koha-dev.example.com and then use different URLs for each site so browser will do cookie scoping for us, e.g. site1.koha-dev.example.com site2.koha-dev.example.com However, we might also change our cookie name (CGISESSID) to something else: a) site name (if we want to allow single login for opac and intranet) or b) site name+port (if we want separate logins) But that's probably for another bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8553|0 |1 is obsolete| | --- Comment #8 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10120 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10120&action=edit Bug 7810 - C4/Auth.pm - on plack restart session is undefined So we shouldn't try to delete it. This produces application error instead of redirection to login page. I had similar problems with CGI, especially when session in browser is still active, and one on filesystem or database is already expired. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Solved the problem when my Plack installation started acting up due to stale cookies. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |paul.poulain@biblibre.com Severity|enhancement |normal --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: tiny patch that can't be harmfull in CGI mode, as it just add a test -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7810 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org