mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 04:28:44 +02:00
N°8017 - Security - dependabot - Symfony's VarDumper vulnerable to un… (#731)
Upgrade all Symfony components to last security fix (~6.4.0)
This commit is contained in:
@@ -40,7 +40,7 @@ class TextDescriptor extends Descriptor
|
||||
{
|
||||
private ?FileLinkFormatter $fileLinkFormatter;
|
||||
|
||||
public function __construct(FileLinkFormatter $fileLinkFormatter = null)
|
||||
public function __construct(?FileLinkFormatter $fileLinkFormatter = null)
|
||||
{
|
||||
$this->fileLinkFormatter = $fileLinkFormatter;
|
||||
}
|
||||
@@ -159,7 +159,7 @@ class TextDescriptor extends Descriptor
|
||||
}
|
||||
}
|
||||
|
||||
protected function describeContainerService(object $service, array $options = [], ContainerBuilder $container = null): void
|
||||
protected function describeContainerService(object $service, array $options = [], ?ContainerBuilder $container = null): void
|
||||
{
|
||||
if (!isset($options['id'])) {
|
||||
throw new \InvalidArgumentException('An "id" option must be provided.');
|
||||
@@ -281,7 +281,7 @@ class TextDescriptor extends Descriptor
|
||||
$options['output']->table($tableHeaders, $tableRows);
|
||||
}
|
||||
|
||||
protected function describeContainerDefinition(Definition $definition, array $options = [], ContainerBuilder $container = null): void
|
||||
protected function describeContainerDefinition(Definition $definition, array $options = [], ?ContainerBuilder $container = null): void
|
||||
{
|
||||
if (isset($options['id'])) {
|
||||
$options['output']->title(sprintf('Information for Service "<info>%s</info>"', $options['id']));
|
||||
@@ -420,7 +420,7 @@ class TextDescriptor extends Descriptor
|
||||
$options['output']->listing($formattedLogs);
|
||||
}
|
||||
|
||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $container = null): void
|
||||
protected function describeContainerAlias(Alias $alias, array $options = [], ?ContainerBuilder $container = null): void
|
||||
{
|
||||
if ($alias->isPublic() && !$alias->isPrivate()) {
|
||||
$options['output']->comment(sprintf('This service is a <info>public</info> alias for the service <info>%s</info>', (string) $alias));
|
||||
@@ -579,7 +579,7 @@ class TextDescriptor extends Descriptor
|
||||
return trim($configAsString);
|
||||
}
|
||||
|
||||
private function formatControllerLink(mixed $controller, string $anchorText, callable $getContainer = null): string
|
||||
private function formatControllerLink(mixed $controller, string $anchorText, ?callable $getContainer = null): string
|
||||
{
|
||||
if (null === $this->fileLinkFormatter) {
|
||||
return $anchorText;
|
||||
@@ -597,7 +597,7 @@ class TextDescriptor extends Descriptor
|
||||
} elseif (!\is_string($controller)) {
|
||||
return $anchorText;
|
||||
} elseif (str_contains($controller, '::')) {
|
||||
$r = new \ReflectionMethod($controller);
|
||||
$r = new \ReflectionMethod(...explode('::', $controller, 2));
|
||||
} else {
|
||||
$r = new \ReflectionFunction($controller);
|
||||
}
|
||||
@@ -649,7 +649,7 @@ class TextDescriptor extends Descriptor
|
||||
|
||||
if ($callable instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($callable);
|
||||
if (str_contains($r->name, '{closure}')) {
|
||||
if (str_contains($r->name, '{closure')) {
|
||||
return 'Closure()';
|
||||
}
|
||||
if ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
|
||||
|
||||
Reference in New Issue
Block a user