plone / plone.protect

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

Release 3.0.19 breaks compatibility with plone4.csrffixes #55

Closed hvelarde closed 8 years ago

hvelarde commented 8 years ago

The changes implemented in #49 break compatibility with plone4.csrffixes:

# bin/instance fg
2016-10-04 15:49:08 INFO ZServer HTTP server started at Tue Oct  4 15:49:08 2016
    Hostname: 0.0.0.0
    Port: 8080
  ...
  File "/home/hvelarde/my.package/parts/instance/bin/interpreter", line 356, in <module>
    execfile(__file__)
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
    run()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 22, in run
    starter.prepare()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
    self.startZope()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
    Zope2.startup()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 118, in startup
    load_zcml()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
    load_site()
  File "/home/hvelarde/.buildout/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
    _context = xmlconfig.file(site_zcml)
  File "/home/hvelarde/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 651, in file
    context.execute_actions()
  File "/home/hvelarde/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 620, in execute_actions
    for action in resolveConflicts(self.actions):
  File "/home/hvelarde/.buildout/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 1527, in resolveConflicts
    raise ConfigurationConflictError(conflicts)
zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions
  For: ('resource', u'protect.js', <InterfaceClass zope.publisher.interfaces.browser.IBrowserRequest>, <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>)
    File "/home/hvelarde/.buildout/eggs/plone.protect-3.0.20-py2.7.egg/plone/protect/configure.zcml", line 38.4-41.10
          <browser:resource
              name="protect.js"
              file="protect.js"
              />
    File "/home/hvelarde/.buildout/eggs/plone4.csrffixes-1.0.9-py2.7.egg/plone4/csrffixes/configure.zcml", line 16.2-19.6
        <browser:resource
          name="protect.js"
          file="protect.js"
          />
gforcada commented 8 years ago

Well that pull request is about bringing its functionality in plone.protect, so it may as well be useless now?

cc @mauritsvanrees

mauritsvanrees commented 8 years ago

This was fixed in plone4.csrffixes version 1.1.

The plone4.csrffixes package is still needed. At least until this pull request is approved and merged: https://github.com/plone/plone.protect/pull/48

gforcada commented 8 years ago

@mauritsvanrees #48 merged, should we add a notice somewhere that plone4.csrffixes is no longer needed then? What would be the matrix here then (plone version vs plone.protect+plone4.csrffixes versions)?

mauritsvanrees commented 8 years ago

I have released plone.protect 3.0.21 with the merged fix.

I have updated the plome4.csrffixes documentation with the latest info to my best knowledge: https://github.com/plone/plone4.csrffixes/commit/78f5da1c0ee91e594ff309f578e38ef4af611fde

Is plone4.csrffixes still needed then or not? We can discuss that further on https://github.com/plone/plone4.csrffixes/issues/19