• Andrew Grigorev's avatar
    Fix CSRF for production deployments · db21a600
    Andrew Grigorev authored
    Current SecureForm implementation generates CSRF secret using
    `os.urandom()` every time when application start up. CSRF secret is used
    to calculate csrf_token check value, so if someone would use a command
    similar to
    
        gunicorn --workers=8 app
    
    to run his flask-admin app on production then most form submissions
    would silently fail (silently - as for now, it is probably another one
    bug).
    
    Instead of custom `os.urandom()` logic the `app.secret_key` value should
    be used to produce CSRF token values.
    db21a600
Name
Last commit
Last update
babel Loading commit data...
doc Loading commit data...
examples Loading commit data...
flask_admin Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
LICENSE Loading commit data...
MANIFEST.in Loading commit data...
Makefile Loading commit data...
NOTICE Loading commit data...
README.rst Loading commit data...
TODO.txt Loading commit data...
projects.rst Loading commit data...
requirements-dev.txt Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...