mirror of
https://github.com/wassname/flask-security.git
synced 2026-08-07 11:22:21 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
029466830d | ||
|
|
31595196fc | ||
|
|
2a0b582911 |
@@ -3,6 +3,15 @@ Flask-Security Changelog
|
||||
|
||||
Here you can see the full list of changes between each Flask-Security release.
|
||||
|
||||
|
||||
Version 1.5.4
|
||||
-------------
|
||||
|
||||
Released January 6th 2013
|
||||
|
||||
- Fix bug in forms with `csrf_enabled` parameter not accounting attempts to login using JSON data
|
||||
|
||||
|
||||
Version 1.5.3
|
||||
-------------
|
||||
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ copyright = u'2012, Matt Wright'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '1.5.3'
|
||||
version = '1.5.4'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:license: MIT, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
__version__ = '1.5.3'
|
||||
__version__ = '1.5.4'
|
||||
|
||||
from .core import Security, RoleMixin, UserMixin, AnonymousUser, current_user
|
||||
from .datastore import SQLAlchemyUserDatastore, MongoEngineUserDatastore
|
||||
|
||||
@@ -42,7 +42,11 @@ def valid_user_email(form, field):
|
||||
|
||||
class Form(BaseForm):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs.setdefault('csrf_enabled', not current_app.testing)
|
||||
if current_app.testing:
|
||||
csrf_enabled = False
|
||||
else:
|
||||
csrf_enabled = request.json is None
|
||||
kwargs.setdefault('csrf_enabled', csrf_enabled)
|
||||
super(Form, self).__init__(*args, **kwargs)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user