mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 22:18:46 +02:00
N°8637 - Alerts from dependabot, vulnerable libraries
* Update twig/twig from 3.16.0 to 3.21.1 * Update tecnickcom/tcpdf from 6.7.5 to 6.10.0 * Correct font folder case failing on linux server * Suppress documentation generator from project in favor of the online version * Update symfony/http-foundation from 6.4.2 to 6.4.14 Update symfony/runtime from 6.4.0 to 6.4.24
This commit is contained in:
@@ -95,7 +95,7 @@ class SymfonyRuntime extends GenericRuntime
|
||||
|
||||
if (isset($options['env'])) {
|
||||
$_SERVER[$envKey] = $options['env'];
|
||||
} elseif (isset($_SERVER['argv']) && class_exists(ArgvInput::class)) {
|
||||
} elseif (empty($_GET) && isset($_SERVER['argv']) && class_exists(ArgvInput::class)) {
|
||||
$this->options = $options;
|
||||
$this->getInput();
|
||||
}
|
||||
@@ -108,7 +108,7 @@ class SymfonyRuntime extends GenericRuntime
|
||||
|
||||
if (isset($this->input) && ($options['dotenv_overload'] ?? false)) {
|
||||
if ($this->input->getParameterOption(['--env', '-e'], $_SERVER[$envKey], true) !== $_SERVER[$envKey]) {
|
||||
throw new \LogicException(sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey));
|
||||
throw new \LogicException(\sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey));
|
||||
}
|
||||
|
||||
if ($_SERVER[$debugKey] && $this->input->hasParameterOption('--no-debug', true)) {
|
||||
@@ -144,7 +144,11 @@ class SymfonyRuntime extends GenericRuntime
|
||||
|
||||
if (!$application->getName() || !$console->has($application->getName())) {
|
||||
$application->setName($_SERVER['argv'][0]);
|
||||
$console->add($application);
|
||||
if (method_exists($console, 'addCommand')) {
|
||||
$console->addCommand($application);
|
||||
} else {
|
||||
$console->add($application);
|
||||
}
|
||||
}
|
||||
|
||||
$console->setDefaultCommand($application->getName(), true);
|
||||
@@ -203,6 +207,10 @@ class SymfonyRuntime extends GenericRuntime
|
||||
|
||||
private function getInput(): ArgvInput
|
||||
{
|
||||
if (!empty($_GET) && filter_var(\ini_get('register_argc_argv'), \FILTER_VALIDATE_BOOL)) {
|
||||
throw new \Exception('CLI applications cannot be run safely on non-CLI SAPIs with register_argc_argv=On.');
|
||||
}
|
||||
|
||||
if (isset($this->input)) {
|
||||
return $this->input;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user