Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to master - fix import path for CKAN 2.9 #30

Merged
merged 2 commits into from
Oct 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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