plone / plone.protect

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

do not log a warning for empty responses #69

Closed frisi closed 6 years ago

frisi commented 6 years ago

if a text/html response does not contain any data (eg empty page for an ajax request) we do not log a warning that no csrf token could be added

this fixes #15

not sure if the tests actually add value since i did not find a way to check no warning message is logged.

frisi commented 6 years ago

thanks for your clarifications @mauritsvanrees. i simplified the if statements and started the tests

frisi commented 6 years ago

should be ready to merge @mauritsvanrees :-)

mauritsvanrees commented 6 years ago

Merged. Thank you!