aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-10-04 00:12:03 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-10-14 21:46:17 +0200
commit2dc8d249326458b4d70e0cf1efbc956dccb12d3f (patch)
treec288186023cf6f8628369b04fd86adfcd20d52f7 /bootstrap.py
parent917d4663afedded7e6606b1a799771da8dc2a37c (diff)
downloadmediagoblin-2dc8d249326458b4d70e0cf1efbc956dccb12d3f.tar.lz
mediagoblin-2dc8d249326458b4d70e0cf1efbc956dccb12d3f.tar.xz
mediagoblin-2dc8d249326458b4d70e0cf1efbc956dccb12d3f.zip
Some mostly cosmetic changes to CSRF
* remove max_age - A session cookie is better, because it's a session thing, really. * Call the cookie mediagoblin_csrftoken, much clearer. * Use the SCRIPT_NAME for the path of the cookie, so that the cookie is sent back to the right place only. Alternatively the path= parameter could be removed, so that it defaults to '/'. * call the randomness function only once, instead of twice. 64 bits should be enough. If really more bits are needed, increase the number. * Just give the number as cookie. No point in md5 and hexdigest in my view (those functions just make another representation). * getrandbits gets a bit count directly, simpler API
Diffstat (limited to 'bootstrap.py')
0 files changed, 0 insertions, 0 deletions