. * --------------------------------------------------------------------- * @copyright Copyright © 2021 - 2022 Edgard * @license http://www.gnu.org/licenses/gpl.txt GPLv3+ * @link https://github.com/edgardmessias/glpi-singlesignon/ * --------------------------------------------------------------------- */ include('../../../inc/includes.php'); $provider = new PluginSinglesignonProvider(); $path = false; if (isset($_GET['id'])) { // docid for document if (!$provider->getFromDB($_GET['id'])) { Html::displayErrorAndDie(__('Unknown file'), true); } $path = $provider->fields['picture']; } else if (isset($_GET['path'])) { $path = $_GET['path']; } else { Html::displayErrorAndDie(__('Invalid filename'), true); } $path = GLPI_PLUGIN_DOC_DIR . "/singlesignon/" . $path; if (!file_exists($path)) { Html::displayErrorAndDie(__('File not found'), true); // Not found } Toolbox::sendFile($path, "logo.png", null, true);