derricksmith / phpsaml

GLPI Plugin - SAML integration using the Onelogin SAML Library
MIT License
32 stars 24 forks source link

fix glpi_plugin_phpsaml_configs initial insertion and GLPI_ROOT definition #106

Closed tomas321 closed 2 years ago

tomas321 commented 2 years ago

The install process was misbehaving and attempts to initialize the jit column in the glpi_plugin_phpsaml_configs table entry with an empty string rather an integer.

This results in inability to update the plugin configuration and shows empty values every time an update is executed.

my setup: Glpi 10.0.3, phpsaml 1.2.1

fixes #101 #98 #86 (at least the main issue mention in either one of them)

tomas321 commented 2 years ago

the added commit 97c8021 should fix #100

tested and working in envrionment:

redefining GLPI_ROOT caused a non-existent templates/ path was access:

[2022-09-27 15:11:03] glpiphplog.CRITICAL:   *** Uncaught Exception Twig\Error\LoaderError: The "../../../templates" directory does not exist ("/var/www/glpi/../../../templates"). in /var/www/glpi/vendor/twig/twig/src/Loader/FilesystemLoader.php at line 92
  Backtrace :
  ...or/twig/twig/src/Loader/FilesystemLoader.php:78 Twig\Loader\FilesystemLoader->addPath()
  ...or/twig/twig/src/Loader/FilesystemLoader.php:45 Twig\Loader\FilesystemLoader->setPaths()
  ...pi/src/Application/View/TemplateRenderer.php:71 Twig\Loader\FilesystemLoader->__construct()
  ...i/src/Application/View/TemplateRenderer.php:134 Glpi\Application\View\TemplateRenderer->__construct()
  /var/www/glpi/src/Html.php:1396                    Glpi\Application\View\TemplateRenderer::getInstance()
  /var/www/glpi/src/Html.php:2143                    Html::includeHeader()
  /var/www/glpi/plugins/phpsaml/front/acs.php:61     Html::nullHeader()