------------
Released 2017-01-06
- Use ItsDangerous to sign CSRF tokens and check expiration instead of
doing it ourselves. :issue:`264`
- All tokens are URL safe, removing the ``url_safe`` parameter
from ``generate_csrf``. :issue:`206`
- All tokens store a timestamp, which is checked in
``validate_csrf``. The ``time_limit`` parameter of
``generate_csrf`` is removed.
- Remove the ``app`` attribute from ``CsrfProtect``, use
``current_app``. :issue:`264`
- ``CsrfProtect`` protects the ``DELETE`` method by default.
:issue:`264`
- The same CSRF token is generated for the lifetime of a request. It
is exposed as ``g.csrf_token`` for use during testing.
:issue:`227, 264`
- ``CsrfProtect.error_handler`` is deprecated. :issue:`264`
- Handlers that return a response work in addition to those that
raise an error. The behavior was not clear in previous docs.
- :issue:`200, 209, 243, 252`
- Use ``Form.Meta`` instead of deprecated ``SecureForm`` for CSRF (and
everything else). :issue:`216, 271`
- ``csrf_enabled`` parameter is still recognized but deprecated.
All other attributes and methods from ``SecureForm`` are
removed. :issue:`271`
- Provide ``WTF_CSRF_FIELD_NAME`` to configure the name of the CSRF
token. :issue:`271`
- ``validate_csrf`` raises ``wtforms.ValidationError`` with specific
messages instead of returning ``True`` or ``False``. This breaks
anything that was calling the method directly. :issue:`239, 271`
- CSRF errors are logged as well as raised. :issue:`239`
- ``CsrfProtect`` is renamed to ``CSRFProtect``. A deprecation warning
is issued when using the old name. ``CsrfError`` is renamed to
``CSRFError`` without deprecation. :issue:`271`
- ``FileField`` is deprecated because it no longer provides
functionality over the provided validators. Use
``wtforms.FileField`` directly. :issue:`272`