plone / plone.protect

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

Add ITransform.transformBytes for protect transform to fix compatibility #7

Closed datakurre closed 9 years ago

datakurre commented 9 years ago

To fix compatibility with plone.app.blocks' ESI-rendering.

ESI transform must be the only transform, which returns bytes, and because Protect transform comes after that, it breaks blocks' ESI rendering on Plone 5.

The real reason, why ESI transform returns bytes, is that the ESI helpers in plone.tiles are implemented to work on bytestrings https://github.com/plone/plone.tiles/blob/master/plone/tiles/esi.py

/cc https://github.com/plone/plone.app.blocks/issues/15

davisagli commented 9 years ago

I think we should also get rid of the transformString and __call__ methods of ProtectTransform; they don't appear to be used and aren't part of the ITransform interface.

jensens commented 9 years ago

@davisagli this PR fixes one particular problem i think, so your point is true, but can we make it an own issue? Imo this PR can be merged then.

davisagli commented 9 years ago

+1