out there (or server misconfigs for that matter) Oh: Update to the latest Python point release But please read and apply: https://cipherli.st/ https://www.ssllabs.com/ssltest/
shouldn't I implement it on my own) Authenticate the user Set session_auth_hash Flush/rotate session key Rotate CSRF token Check redirects Set session cookie & redirect
update if needed • session_auth_hash: Sign out all other sessions after password change • Change session and CSRF tokens on login to prevent fixation • Check next target to ensure that the user stays on the same site
the user Link can be used once (!) to reset the password /reset/MQ/46h-6965b6f67bcf041e513a/ User Timestamp HMAC of User.pk, password, last login & timestamp
< > ' “ & with entities Always use quotes around attributes Javascript requires different escaping var mystr = '{{ value|escapejs }}'; Only for use in strings!
inline JS, no event handlers Content-Security-Policy (not yet in Django) No User supplied CSS! Check your (filter) libraries & code, many people just do mark_safe(json.dumps())
we trust the browser here. (Since you said do not trust headers) Form on evil.com: <form method='post' action='somesite.com'> <input name='csrfmiddlewaretoken' value='?' /> How to get the CSRF token?