Skip to content

Commit

Permalink
set up request["PARENTS"] before request parameter processing
Browse files Browse the repository at this point in the history
  • Loading branch information
d-maurer committed Oct 30, 2024
1 parent 072af95 commit 8c42ace
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ https://github.com/zopefoundation/Zope/blob/4.x/CHANGES.rst
5.11.1 (unreleased)
-------------------

- Define ``request["PARENTS"]`` before request parameter processing
such that request failure subscribers (such as that of
``Products.SiteErrorLog``) can determine the error context
for exceptions raised during request parameter processing
(see `#1235 <https://github.com/zopefoundation/Zope/issues/1235>`_).


5.11 (2024-10-11)
-----------------
Expand Down
3 changes: 1 addition & 2 deletions src/ZPublisher/WSGIPublisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def transaction_pubevents(request, response, tm=transaction.manager):

def publish(request, module_info):
obj, realm, debug_mode = module_info
request['PARENTS'] = [obj]

request.processInputs()
response = request.response
Expand All @@ -264,8 +265,6 @@ def publish(request, module_info):
# Get the path list.
# According to RFC1738 a trailing space in the path is valid.
path = request.get('PATH_INFO')
request['PARENTS'] = [obj]

obj = request.traverse(path, validated_hook=validate_user)

# Set debug information from the active request on the open connection
Expand Down

0 comments on commit 8c42ace

Please sign in to comment.