deadmanIsARabbit / myAssets

GLPI plugin to display a plain table of devices/assets owned by the current user on his or her dashboard
2 stars 1 forks source link

[INSTALL] The Plugin is not compatible CSRF #2

Open TarekDB7 opened 7 years ago

TarekDB7 commented 7 years ago

Hello,

I wanted to test the plugin but I noticed that the plugin is not CSRF compliant. Can you correct this anomaly?

Regards,

Tarek

roshanroche commented 7 years ago

Dear Tarek, please update setup.php file under plugin myassets, line 41 edit ['myassets'] to ['myAssets'] like below $PLUGIN_HOOKS['csrf_compliant']['myAssets'] = true;

deadmanIsARabbit commented 7 years ago

This is strange. On our system this only works with $PLUGIN_HOOKS['csrf_compliant']['myassets'] = true; As soon as i change it to $PLUGIN_HOOKS['csrf_compliant']['myAssets'] = true; i get a csrf_compliant error.

Can you guys tell me which PHP Version you are running?

roshanroche commented 7 years ago

PHP 5.4 and moroever even after installing the plugin im getting this error on the central home page Personal View

Fatal error: Class 'PluginMyassetsAssets' not found in /var/www/html/glpi/plugins/myAssets/setup.php on line 48

deadmanIsARabbit commented 7 years ago

Okay, i will setup an virtual machine with PHP5.4 and test this. Thanks for the bug report.

Greetings, Matt

SL-Gundam commented 7 years ago

I'm running PHP 7.1.3 on Windows 2012 R2 IIS using FastCGI

I've got the same issue

I've also found the reason for this issue The package that is downloaded from the release website includes the foldername "myAssets" and extracts that foldername to the plugin folder

You can either rename the folder to "myassets" or change the line in question as mentioned here earlier