From 1b1d961b79e825092b8673d34618df4ec464b1e3 Mon Sep 17 00:00:00 2001 From: Rom1-B <8530352+Rom1-B@users.noreply.github.com> Date: Fri, 13 Nov 2026 11:03:19 +0100 Subject: [PATCH] feat: make plugin CSP compliant --- CHANGELOG.md | 1 + setup.php | 1 + templates/migration_status.html.twig | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0e8f96..53fbbf4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASED] - Fix Composer autoloader collisions with other plugins +- Make the plugin compatible with the Content Security Policy ## [3.0.3] - 2026-08-11 diff --git a/setup.php b/setup.php index c460bbb..2672b22 100644 --- a/setup.php +++ b/setup.php @@ -134,6 +134,7 @@ function plugin_version_genericobject() 'author' => "Teclib' & siprossii", 'homepage' => 'https://github.com/pluginsGLPI/genericobject', 'license' => 'GPLv2+', + 'csp_compliant' => true, 'requirements' => [ 'glpi' => [ 'min' => PLUGIN_GENERICOBJECT_MIN_GLPI, diff --git a/templates/migration_status.html.twig b/templates/migration_status.html.twig index bee5cf3..01d1d4a 100644 --- a/templates/migration_status.html.twig +++ b/templates/migration_status.html.twig @@ -256,7 +256,7 @@ data-counter-target="{{ modal_id }}-counter" data-warning-target="{{ modal_id }}-length-warning" data-result-target="{{ modal_id }}-result" - oninput="glpiGenericobjectUpdateCounter(this)" + data-genericobject-update-counter required >
php bin/console migration:genericobject_plugin_to_core
-