Repository navigation
[main] feat: make plugin CSP compliant - #258
Merged
Merged
Conversation
Contributor
Author
|
Please cherry-pick the changes locally and resolve any conflicts. git fetch origin forward-port/255-to-main
git worktree add --checkout .worktree/forward-port/255-to-main forward-port/255-to-main
cd .worktree/forward-port/255-to-main
git reset --hard HEAD^
git cherry-pick -x 287e845eb7c9430099bc5bc9219be90addccb3f3 |
Rom1-B
force-pushed
the
forward-port/255-to-main
branch
from
November 24, 2026 09:02
346b226 to
e08f937
Compare
Rom1-B
marked this pull request as ready for review
November 24, 2026 10:54
Rom1-B
requested review from
a team,
Mary-Clb,
Rom1-B and
jdurand-teclib
and removed request for
a team
November 24, 2026 10:54
Rom1-B
approved these changes
Nov 24, 2026
jdurand-teclib
approved these changes
Nov 25, 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.
Forward-port of #255 to
main.Description
The plugin now declares
csp_compliantand no longer relies on inline event handlers, so it keeps working when GLPI sends its Content Security Policy.Converted patterns:
templates/view.html.twig: fullscreen buttononclick="gantt.ext.fullscreen.toggle();"replaced by thedata-gantt-fullscreenattribute (category a).templates/view.html.twig: search fieldoninput="gantt.$doFilter(this.value);"replaced by thedata-gantt-filterattribute (category a).public/js/gantt-helper.js: two delegated listeners bound once at file load, calling the same functions with the same arguments.setup.php:'csp_compliant' => trueadded toplugin_version_gantt().No
<script>tag was printed from PHP or created from JavaScript: the only inline script is literal Twig text and receives the nonce automatically.No behaviour change.
Blocked by
PLUGIN_GANTT_MIN_GLPI_VERSION, currently 11.0.0) must be bumped to the first CSP-enabled release before merging.Manual test checklist
Open a project with the Gantt tab (Project item, Gantt tab) and keep the browser console open. CSP violations are reported there as
Refused to execute inline event handlerorRefused to execute inline script.