Skip to content

Commit

Permalink
Merge pull request #30 from qld-gov-au/develop
Browse files Browse the repository at this point in the history
Develop to master - fix import path for CKAN 2.9
  • Loading branch information
ThrawnCA authored Oct 5, 2022
2 parents e2b4987 + af8dd0b commit 6c292c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ckanext/csrf_filter/token_protected_friendlyform.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"""

from logging import getLogger
from repoze.who.plugins import friendlyform
try:
from ckan.lib.repoze_plugins.friendly_form import FriendlyFormPlugin
except ImportError:
from repoze.who.plugins.friendlyform import FriendlyFormPlugin
from webob import Request

from ckanext.csrf_filter import anti_csrf

LOG = getLogger(__name__)


class TokenProtectedFriendlyFormPlugin(friendlyform.FriendlyFormPlugin):
class TokenProtectedFriendlyFormPlugin(FriendlyFormPlugin):
""" Extends the FriendlyFormPlugin to validate CSRF tokens before logging in.
Not currently compatible with other FriendlyForm subclasses.
Expand Down

0 comments on commit 6c292c4

Please sign in to comment.