Skip to content

Commit

Permalink
Merge e3ff099 into 3c9dcf5
Browse files Browse the repository at this point in the history
  • Loading branch information
twolfson committed Jan 28, 2016
2 parents 3c9dcf5 + e3ff099 commit 37c1e0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flask_wtf/csrf.py
Expand Up @@ -167,14 +167,14 @@ def _csrf_protect():
if request.method not in app.config['WTF_CSRF_METHODS']:
return

if self._exempt_views or self._exempt_blueprints:
if not request.endpoint:
return
if not request.endpoint:
return

view = app.view_functions.get(request.endpoint)
if not view:
return
view = app.view_functions.get(request.endpoint)
if not view:
return

if self._exempt_views or self._exempt_blueprints:
dest = '%s.%s' % (view.__module__, view.__name__)
if dest in self._exempt_views:
return
Expand Down

0 comments on commit 37c1e0e

Please sign in to comment.