Skip to content

Commit

Permalink
[refs #22] Trying to remove IDisableCSRFProtection
Browse files Browse the repository at this point in the history
Tests now pass without IDisableCSRFProtection, unknown why.
  • Loading branch information
david-batranu committed May 2, 2022
1 parent f453ce9 commit 4114ee0
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions plone/session/plugins/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from plone.keyring.keyring import Keyring
from plone.session import tktauth
from plone.session.interfaces import ISessionPlugin
from plone.protect.interfaces import IDisableCSRFProtection
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PluggableAuthService.interfaces.plugins import IAuthenticationPlugin # noqa
from Products.PluggableAuthService.interfaces.plugins import ICredentialsResetPlugin # noqa
Expand Down Expand Up @@ -295,10 +294,6 @@ def updateCredentials(self, request, response, login, new_password):
# ICredentialsResetPlugin implementation
def resetCredentials(self, request, response):
if self.per_user_keyring:
# Prevent plone.protect from redirecting to @@confirm-action
# instead of logging-out.
# Caused by invalidating the user keyring.
alsoProvides(request, IDisableCSRFProtection)
# Sometimes (found during testing) the __ac cookie is not
# set by this plugin, and fails the base64 decode.
# Using extractCredentials again as it safely gets the decoded
Expand Down

0 comments on commit 4114ee0

Please sign in to comment.