Probesys / glpi-plugins-groupcategory

GLPI plugin that allows to limit the number of categories available for ticket requesters.
GNU Affero General Public License v3.0
5 stars 4 forks source link

[9.5.0] le plugin n'est pas conforme CSRF #13

Closed joomlafun closed 4 years ago

joomlafun commented 4 years ago

//PHP 7.3.16 ; Centos 8.1 stable //logs below

Unwanted current behavior: When activating plugin : "Message n'est pas conforme CSRF" ; however if I enter the plugin name in the setup.php line 31 like this : $PLUGIN_HOOKS['csrf_compliant'][GroupCategory] = true; Then the plugin activates but with the error messages below

Wanted proper behavior : No error message when activating the plugin

Logs: PHP Warning (2): Use of undefined constant GroupCategory - assumed 'GroupCategory' (this will throw an Error in a future version of PHP) in /home/newsurf9/glpidemo1/plugins/GroupCategory/setup.php at line 31 PHP Warning (2): Cannot modify header information - headers already sent by (output started at /home/newsurf9/glpidemo1/inc/application/errorhandler.class.php:364) in /home/newsurf9/glpidemo1/ajax/displayMessageAfterRedirect.php at line 37 PHP Warning (2): Cannot modify header information - headers already sent by (output started at /home/newsurf9/glpidemo1/inc/application/errorhandler.class.php:364) in /home/newsurf9/glpidemo1/inc/html.class.php at line 2203 PHP Warning (2): Cannot modify header information - headers already sent by (output started at /home/newsurf9/glpidemo1/inc/application/errorhandler.class.php:364) in /home/newsurf9/glpidemo1/inc/html.class.php at line 2204

joomlafun commented 4 years ago

Reason of the issue was the folder of the plugin wrongly named by me ; the plugin folder should just be named "groupcategory"