Repository navigation
Conversation
Rom1-B
force-pushed
the
csp-compliance
branch
from
November 16, 2026 07:38
e2257d4 to
9e96f6f
Compare
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.
Checklist before requesting a review
Description
Makes the plugin compatible with the Content Security Policy sent by GLPI 11, 12 and 13, and declares it with
'csp_compliant' => true.No inline event handler or unnonced inline script remains; behaviour is unchanged.
Converted patterns:
inc/history.class.php<script>printed from PHP (form pre-fill of the history reassign buttons) now usesHtml::scriptBlock()(pattern d).onclick='full_history.show();'on the "more history" link replaced by an id and a jQuery listener in aHtml::scriptBlock()(pattern a).onclick='self.opener.location.href=...; self.close();'on group links in the full history popup replaced by an id and a jQuery listener readingthis.href(pattern a).templates/config.html.twigon_changeof the "Use the technician's group" dropdown (fields.dropdownArrayField) replaced by anadd_data_attributesmarker and a delegated jQuerychangelistener in the existing page script (pattern b).setup.php'csp_compliant' => trueadded toplugin_version_escalade().No change to the JS files in
public/js/: they are served as script files and contain no inline handler.Blocked by: glpi-project/glpi#26020 (CSP in GLPI core) and its 11.0 and 12.0 backports.
PLUGIN_ESCALADE_MIN_GLPImust be bumped to the first CSP-enabled GLPI release before merging, because thecsp_compliantdeclaration and the nonce handling do not exist in older releases.No JS build needed: no file under
js/orpublic/was edited.Screenshots (if appropriate):
Manual test checklist (keep the browser console open, CSP violations show as "Refused to execute inline event handler" or "Refused to execute inline script"):
climb_group.phpwith the ticket details pre-filled.