plone / plone.protect

HTTP protection utilities for the Plone CMS
https://pypi.org/project/plone.protect/
7 stars 8 forks source link

aborting transaction by plone.protect does not modify the error code to signal user error #44

Open do3cc opened 8 years ago

do3cc commented 8 years ago

I was surprised that a cronjob never created error mails when he curled our site after we added plone protect.

Then I detected, that plone protect does NOT change the response code of a reply. My view sends out text, then finishes. The calling script has no way of knowing, that it didn't work.

mauritsvanrees commented 8 years ago

Doesn't it give a 301 or 302 error, redirecting to @@confirm-action?

https://github.com/plone/plone.protect/blob/master/plone/protect/auto.py#L243

do3cc commented 8 years ago

This line checks if the response code is 301 or 302. Nowhere is the response code itself modified :-(