beaker icon indicating copy to clipboard operation
beaker copied to clipboard

session was not delete from persistent storage.

Open xieyu opened this issue 11 years ago • 2 comments

def delete(self): """Deletes the session from the persistent storage, and sends an expired cookie out""" if self.use_cookies: self._delete_cookie() self.clear()

xieyu avatar Jul 31 '14 03:07 xieyu

Yes, I ran into the same issue. I have a Redis beaker backend and the sessions keep piling up. delete() should have a statement like

del self.namespace['session']

pszalanski avatar Dec 11 '15 13:12 pszalanski

The clear method in _ConfigurableSession() assumes that a clear() on its superclass (dict) would call delitem, but it does not. So the session stays in persistent storage. This is insidious when using regenerate_id() as the old ID stays valid!

schlenk avatar Dec 18 '19 17:12 schlenk