WeBWorK Main Forum

expiring cookie

expiring cookie

by Boyd Duffee -
Number of replies: 1
I'm looking for hints as to why my cookies are being thrown away.

I've upgraded my webwork (to 2.5.0), apache and database and now the cookies are not respected. I tick the Remember Me box, but I'm always asked to log in again whenever I click on the course from the Courses page, which wasn't the case with 2.4.5

It looks like WebWork is setting the cookie to expire the previous day.
I captured the http headers.
WebWork sends:
Date: Tue, 27 Sep 2011 21:06:32 GMT^M
Server: Apache/2.0.64 (Unix) mod_apreq2-20090110/2.8.0 mod_perl/2.0.5 Perl/v5.8.8
Set-Cookie: WeBWorKCourseAuthen.U6_physics_Catalan=admin%09754dQE3dSZq6ExFuLdD0vldoe2rzNc7f; path=/webwork2; domain=webwork.cs.keele.ac.uk; expires=Thu, 27-Oct-2011 21:06:32 GMT
Connection: close

the web proxy sends
Referer: http://webwork.cs.keele.ac.uk/webwork2/
Cookie: WeBWorKCourseAuthen.U6_physics_Catalan=admin%09754dQE3dSZq6ExFuLdD0vldoe2rzNc7f; __utma=210201103.1449631745.1256225399.1313413333.1316366952.5; __utmz=210201103.1316366952.5.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=Portfolio%20graduate%20school

which is the same cookie

and then WebWork sets the cookie to expire the previous day
Date: Tue, 27 Sep 2011 21:07:05 GMT
Server: Apache/2.0.64 (Unix) mod_apreq2-20090110/2.8.0 mod_perl/2.0.5 Perl/v5.8.8
Set-Cookie: WeBWorKCourseAuthen.U6_physics_Catalan=%09; path=/webwork2; domain=webwork.cs.keele.ac.uk; expires=Mon, 26-Sep-2011 21:07:05 GMT

I've set the timezone in global.conf to Europe/London and my /etc/sysconfig/clock says:
ZONE="Europe/London"
UTC=true
ARC=false


thoughts?
Boyd
In reply to Boyd Duffee

Re: expiring cookie

by Michael Gage -
Yes -- we've seen this.  It's related to this bug report

http://bugs.webwork.maa.org/show_bug.cgi?id=2078

and it's also related to this thread.

http://webwork.maa.org/moodle/mod/forum/discuss.php?d=1999

which the cookie patch was meant to fix.  We'll try to get a fix ready

and then distributed in trunk.  If someone has robust fix for the cookie problem already send it  to Jason Aubrey or me.