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

extractCredentials: do not fail when the request is too large to read. #1726

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/3848.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``extractCredentials``: do not fail when the request is too large to read.
@maurits
3 changes: 3 additions & 0 deletions src/plone/restapi/pas/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from Products.PluggableAuthService.interfaces.plugins import IChallengePlugin
from Products.PluggableAuthService.interfaces.plugins import IExtractionPlugin
from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
from zExceptions import BadRequest
from zope.component import getUtility
from zope.interface import implementer

Expand Down Expand Up @@ -98,6 +99,8 @@ def extractCredentials(self, request):
# is intended to change or update the logged in user.
try:
creds = deserializer.json_body(request)
except BadRequest:
pass
except exceptions.DeserializationError:
pass
else:
Expand Down