Skip to content

Commit

Permalink
extractCredentials: do not fail when the request is too large to read.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Oct 31, 2023
1 parent c43fd4f commit 3a3770b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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

0 comments on commit 3a3770b

Please sign in to comment.