Comment 15 for bug 372632

Revision history for this message
David Glick (davisagli) wrote :

There is still a regression in this code compared to 2.10. In 2.10, an Unauthorized exception raised while publishing an object ended up being re-raised by SimpleItem's raise_standardErrorMessage, then caught by the general exception handler in ZPublisher/Publish.py's publish_module_standard, which resulted in calling request.response.exception()...this is where PluggableAuthService's 'challenge' plugin hooks in, which is the mechanism by which, in Plone at least, accessing an unauthorized object results in a redirection to the login screen.

In Zope 2.12.0b3, raise_standardErrorMessage determines that the handle_errors flag is True, so it returns the rendered standard_error_message rather than reraising the error...so that is what the response renders and it never gets a chance to process the exception.

I don't understand the purpose of why the handle_errors flag was added in the first place, so I'm having a hard time figuring out the correct way to test and resolve this. Can anyone shed some light on it?