Simon Willison’s Weblog

Subscribe
Atom feed for sessions

6 items tagged “sessions”

2009

Towards a Standard for Django Session Messages. I completely agree that Django’s user.message_set (which I helped design) is unfit for purpose, but I don’t think sessions are the right solution for messages sent to users. A signed cookie containing either the full message or a key referencing the message body on the server is a much more generally useful solution as it avoids the need for a round trip to a persistent store entirely.

# 19th June 2009, 9:57 pm / cookies, django, flash, messages, python, sessions, signedcookies

ericflo’s django-tokyo-sessions. A Django sessions backend using Tokyo Cabinet, via Tokyo Tyrant and the PyTyrant library. A fast key/value store is a much better solution for sessions than a relational database.

# 7th May 2009, 7:30 am / databases, django, eric-florenzano, keyvaluestores, pytyrant, sessions, tokyocabinet, tokyotyrant

2008

Session variables without cookies. Brilliant but terrifying hack—you can store up to 2 MB of data in window.name and it persists between multiple pages, even across domains. Doesn’t work with new tabs though, and storing JSON in it and eval()ing it is a bad idea—a malicious site could populate it before sending the user to you.

# 13th May 2008, 9:59 pm / crossdomainstorage, eval, javascript, json, security, sessions

Sharedance (via) “Sharedance is a high-performance server that centralize ephemeral key/data pairs on remote hosts, without the overhead and the complexity of an SQL database.”—ideally suited to session data, which is a poor fit for a full relational database.

# 12th April 2008, 10:39 am / django, sessions, sharedance

2007

Rails 1.2.4: Maintenance release. “Session fixation attacks are mitigated by removing support for URL-based sessions”—I’ve always hated URL-based sessions; I’d be interested to hear if their removal from Rails causes legitimate problems for anyone.

# 5th October 2007, 11:42 pm / rails, security, sessionfixation, sessions

pear 0.8. “A libevent/pyevent-based locking session daemon for the web”. Relational databases aren’t particularly well suited to the access characteristics of session data.

# 4th March 2007, 9:19 pm / libevent, python, sessions