comparison roundup/cgi/client.py @ 3605:91c759d9271d

dangling connections in session handling [SF#1463359]
author Richard Jones <richard@users.sourceforge.net>
date Thu, 27 Apr 2006 03:48:41 +0000
parents ea471747d5aa
children 04dc3eef67b7
comparison
equal deleted inserted replaced
3604:ccf516e6c3f8 3605:91c759d9271d
1 # $Id: client.py,v 1.223 2006-02-12 11:00:23 a1s Exp $ 1 # $Id: client.py,v 1.224 2006-04-27 03:48:41 richard Exp $
2 2
3 """WWW request handler (also used in the stand-alone server). 3 """WWW request handler (also used in the stand-alone server).
4 """ 4 """
5 __docformat__ = 'restructuredtext' 5 __docformat__ = 'restructuredtext'
6 6
456 raise Unauthorised, err 456 raise Unauthorised, err
457 457
458 user = username 458 user = username
459 459
460 # if user was not set by http authorization, try session cookie 460 # if user was not set by http authorization, try session cookie
461 if (not user) and self.cookie.has_key(self.cookie_name) \ 461 if (not user and self.cookie.has_key(self.cookie_name)
462 and (self.cookie[self.cookie_name].value != 'deleted'): 462 and (self.cookie[self.cookie_name].value != 'deleted')):
463 # get the session key from the cookie 463 # get the session key from the cookie
464 self.session = self.cookie[self.cookie_name].value 464 self.session = self.cookie[self.cookie_name].value
465 # get the user from the session 465 # get the user from the session
466 try: 466 try:
467 # update the lifetime datestamp 467 # update the lifetime datestamp
468 sessions.updateTimestamp(self.session) 468 sessions.updateTimestamp(self.session)
469 user = sessions.get(self.session, 'user') 469 user = sessions.get(self.session, 'user')
470 self.db.commit()
470 except KeyError: 471 except KeyError:
471 # not valid, ignore id 472 # not valid, ignore id
472 pass 473 pass
473 474
474 # if no user name set by http authorization or session cookie 475 # if no user name set by http authorization or session cookie

Roundup Issue Tracker: http://roundup-tracker.org/