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

set up request["PARENTS"] before request parameter processing #1236

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
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
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
Loading