-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.3.x csrffixes partial #176
Conversation
BTW, I am wondering if we need to do something with |
@mauritsvanrees you are testing this pull request against plone 5.0, while it should be 4.3! :-) |
Haha, good catch. :-) |
f43fbab
to
a69ef37
Compare
Getting |
@mauritsvanrees no idea about the 400 error, but given that you are working on branches, just put debug information on the test to see which URL and content is there? that could help |
- Prodcts.PlonePAS: - as of 5.0.5 it also integrates Plone Hotfix 2015-12-08. - as of 5.0.6 it adds back Python 2.6 support (for Plone 4.3) - plone.namedfile
Latest master has a fix needed to read the setup.py on Python 2.6.
This does not depend on plone4.csrffixes, so does not get plone.protect 3.x.
That should give us more info about a failing test.
c684e9c
to
5442c0a
Compare
Ha, this now works. Looks ready for merge. Well, not this coredev branch: the individual package branches should be merged. So to summarise what we would change here:
|
@mauritsvanrees cool! thanks a lot for you effort on this! |
Merged. |
@mauritsvanrees Guys, I think we have an interesting issue here.
In So, with packages that need to be Plone 4 and 5 compatible, when using Plone 4 and plone4.csrffixes for ajax requests everything is fine, but when using Plone 5 we need to manually do this with two approaches:
Our question is: will this implementation be added to plone.protect, or do we need to manually add to our packages? Are we missing something here? |
See plone/plone.protect#42 where we can discuss this last question. |
Branch: refs/heads/master Date: 2018-10-01T17:43:15+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@e0a48eb testfixes for plone 5.2 and python 3 Files changed: M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T17:50:44+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@ba85502 add changelog Files changed: A news/176.bugfix Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T18:57:05+02:00 Author: Peter Mathis (petschki) <petschki@users.noreply.github.com> Commit: plone/plone.app.upgrade@d94d545 Merge pull request #176 from plone/python3-testfixes testfixes for plone 5.2 and python 3 Files changed: A news/176.bugfix M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2018-10-01T17:43:15+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@e0a48eb testfixes for plone 5.2 and python 3 Files changed: M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T17:50:44+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@ba85502 add changelog Files changed: A news/176.bugfix Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T18:57:05+02:00 Author: Peter Mathis (petschki) <petschki@users.noreply.github.com> Commit: plone/plone.app.upgrade@d94d545 Merge pull request #176 from plone/python3-testfixes testfixes for plone 5.2 and python 3 Files changed: A news/176.bugfix M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2018-10-01T17:43:15+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@e0a48eb testfixes for plone 5.2 and python 3 Files changed: M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T17:50:44+02:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.upgrade@ba85502 add changelog Files changed: A news/176.bugfix Repository: plone.app.upgrade Branch: refs/heads/master Date: 2018-10-01T18:57:05+02:00 Author: Peter Mathis (petschki) <petschki@users.noreply.github.com> Commit: plone/plone.app.upgrade@d94d545 Merge pull request #176 from plone/python3-testfixes testfixes for plone 5.2 and python 3 Files changed: A news/176.bugfix M plone/app/upgrade/tests/test_upgrade.py M plone/app/upgrade/v41/alphas.py M plone/app/upgrade/v41/final.py M plone/app/upgrade/v43/alphas.py M plone/app/upgrade/v50/alphas.py M plone/app/upgrade/v50/betas.py
Branch: refs/heads/master Date: 2019-02-04T14:26:48+01:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.layout@2438142 fix for python3 Files changed: M plone/app/layout/globals/layout.py Repository: plone.app.layout Branch: refs/heads/master Date: 2019-02-04T14:29:46+01:00 Author: Peter Mathis (petschki) <peter.mathis@kombinat.at> Commit: plone/plone.app.layout@5944dd8 update changelog Files changed: M CHANGES.rst Repository: plone.app.layout Branch: refs/heads/master Date: 2019-02-04T17:09:53+01:00 Author: Peter Mathis (petschki) <petschki@users.noreply.github.com> Commit: plone/plone.app.layout@3c9a77d Merge pull request #176 from plone/py3-fix fix python3 compatibility Files changed: M CHANGES.rst M plone/app/layout/globals/layout.py
Branch: refs/heads/master Date: 2021-08-17T08:09:38+02:00 Author: Michael Howitz (icemac) <mh@gocept.com> Commit: plone/plone.recipe.zope2instance@3c2a720 Fix resource warning. Fixes #176 Files changed: M src/plone/recipe/zope2instance/tests/wsgi.rst Repository: plone.recipe.zope2instance Branch: refs/heads/master Date: 2021-08-17T11:35:48+02:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.recipe.zope2instance@58b4e1e Merge pull request #178 from plone/fix-176 Fix resource warning. Files changed: M src/plone/recipe/zope2instance/tests/wsgi.rst
Branch: refs/heads/master Date: 2021-08-17T08:09:38+02:00 Author: Michael Howitz (icemac) <mh@gocept.com> Commit: plone/plone.recipe.zope2instance@3c2a720 Fix resource warning. Fixes #176 Files changed: M src/plone/recipe/zope2instance/tests/wsgi.rst Repository: plone.recipe.zope2instance Branch: refs/heads/master Date: 2021-08-17T11:35:48+02:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.recipe.zope2instance@58b4e1e Merge pull request #178 from plone/fix-176 Fix resource warning. Files changed: M src/plone/recipe/zope2instance/tests/wsgi.rst
Branch: refs/heads/master Date: 2021-11-11T09:04:20+01:00 Author: Alessandro Pisa (ale-rt) <alessandro.pisa@gmail.com> Commit: plone/plone.staticresources@fe42e1e Fix typo Closes #176 Files changed: M src/plone/staticresources/static/components/tinymce-builded/js/tinymce/langs/it.js Repository: plone.staticresources Branch: refs/heads/master Date: 2021-11-13T18:48:39+01:00 Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl> Commit: plone/plone.staticresources@139e097 Merge pull request #177 from plone/ale-rt-patch-1 Fix typo Files changed: M src/plone/staticresources/static/components/tinymce-builded/js/tinymce/langs/it.js
This leans heavily on pull request #150.
Difference is that I keep plone.protect to the 2.x series and do not include plone4.csrffixes.
I include a branch of plone.protect with minimal forward compatibility so you can import
IDisableCSRFProtection
(which has no effect, but at least gives no ImportError) and can use@@authenticator/token
. See https://github.com/plone/plone.protect/tree/2.x-forward-compatBasically the idea is: move the patches from plone4.csrffixes into their correct places, which is what we normally do with hotfixes.
If someone wants csrf protection, then adding plone.protect 3.x to a buildout should be enough, without needing extra packages or pins.
If we want to, this can be a stepping stone for #150. That pull request suffers from too many test failures at the moment, which makes it hard to go forward.
And it is not just test setup problems, but 'live' ones: create a Plone Site, go to @@markup-controlpanel, and you get the confirmation page with the csrf warning. This is because an annotation for
wicked
is initialised on first load. This is a write-on-read that should be fixed (or grudgingly accepted). Whether we use the csrf protection from the newer plone.protect or not, does not really matter for this: this protection simply makes it clearer that there is a write-on-read problem.