https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38365
David Cook <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193298|0 |1 is obsolete| | --- Comment #214 from David Cook <[email protected]> --- Created attachment 193951 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193951&action=edit Bug 38365: Add script to insert CSP nonces into templates Add misc/devel/add_csp_nonces.pl which automatically adds CSP nonce attributes to inline <script> tags in Koha templates. The script: - Finds all .tt and .inc files in koha-tmpl/ - Adds nonce="[% Koha.CSPNonce | $raw %]" to inline scripts - Skips external scripts (those with src= attribute) - Skips scripts that already have nonce= attribute - Skips third-party library files in lib/ and vendor/ Usage: perl misc/devel/add_csp_nonces.pl # Dry run perl misc/devel/add_csp_nonces.pl --apply # Apply changes This script enables easy backporting of CSP nonce support to older Koha versions by running it against their template directories. Signed-off-by: David Cook <[email protected]> Signed-off-by: Lari Taskula <[email protected]> Signed-off-by: David Cook <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
