Repository navigation
Declare the Classic theme's CSP needs in theme.yml - #247
Open
pavelnovitsky wants to merge 1 commit into
Open
pavelnovitsky wants to merge 1 commit into
pavelnovitsky wants to merge 1 commit into
Conversation
Bootstrap 4.0.0-alpha.5 Util.reflow() calls new Function() on every transition (modals, collapse, carousel, tooltips), so Classic needs script-src 'unsafe-eval' or those components break under CSP enforcement. Themes cannot register hooks, so the theme declares the need under global_settings.csp, which core's CspPolicyProvider merges additively. Companion to the native CSP feature in PrestaShop/PrestaShop.
|
Hello @pavelnovitsky! This is your first pull request on classic-theme repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
This was referenced Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to the core Security headers (CSP) feature — PrestaShop/PrestaShop#43192 (base
develop).Adds
global_settings.csp: script-src 'unsafe-eval'toconfig/theme.yml. Under an enforced CSP, Classic's Bootstrap 4.0.0-alpha.5Util.reflow()callsnew Function(), whichscript-srcblocks without'unsafe-eval'(the add-to-cart modal throws a CSPEvalError). This is a hard requirement a merchant cannot curate away from the violation log, so the theme declares it.Must merge before merchants enforce CSP on the Classic theme. The default theme (Hummingbird, modern Bootstrap, no
new Function()) needs no entry. Base branch:develop.