plonetrick.csrfworkarounds
Links:
How it works
This package contains workarounds for legacy code that contains bugs that appear evident after applying the plone4.csrffixes patch.
Usage
Add plonetrick.csrfworkarounds to the list of eggs in your buildout, run buildout and restart Plone.
Disable plone CSRF check in page templates
One of the canonical way to disable the CSRF protection is using this code snippet:
alsoProvides(
self.request,
IDisableCSRFProtection,
)
This solution is better than the workaround provided by this package. The workaround consist in customizing the template adding a call to here/disable_csrf_protection/disable, e.g.:
<metal:slot fill-slot="top_slot" tal:define="dummy here/@@disable_csrf_protection/disable" />
Disable plone CSRF transform when getting TinyMCE configuration
See:
There is no easy fix with this, so I added the workaround view tinymce-jsonconfiguration-csrf-free that wraps the original one adding the requested header.
Example usage:
jQuery.ajax({
url: portal_url + '/@@tinymce-jsonconfiguration-csrf-free?field=' + encodeURI(element.attr('name')),
success: function(data) {
element.attr({'data-mce-config': data});
element.addClass('mce_editable');
element.addClass('pat-tinymce');
window.initTinyMCE(element.parent(), {});
}
});
- orphan:
Changelog
0.9.0 (2015-11-25)
Initial release. [ale-rt]
Metadata
Release files for plonetrick.csrfworkarounds 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plonetrick.csrfworkarounds-0.9.0.tar.gz | 9.2 kB | Without provenance | Details for plonetrick.csrfworkarounds-0.9.0.tar.gz |
Release files / plonetrick.csrfworkarounds-0.9.0.tar.gz
| Download URL | plonetrick.csrfworkarounds-0.9.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00512448872d15b9894466a161131c8acdc50437726f20c0edfb7bc8767ee45e
|
|
BLAKE2b-256 checksum How to use checksums |
d073cadf232adb326e3266aa2d27318b24732e6cb1285878301e1a1b6e129e3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for plonetrick.csrfworkarounds 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.