mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 12:38: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:
@@ -53,7 +53,7 @@ class XmlDescriptor extends Descriptor
|
||||
$this->writeDocument($this->getContainerTagsDocument($container, isset($options['show_hidden']) && $options['show_hidden']));
|
||||
}
|
||||
|
||||
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.');
|
||||
@@ -67,12 +67,12 @@ class XmlDescriptor extends Descriptor
|
||||
$this->writeDocument($this->getContainerServicesDocument($container, $options['tag'] ?? null, isset($options['show_hidden']) && $options['show_hidden'], isset($options['show_arguments']) && $options['show_arguments'], $options['filter'] ?? null, $options['id'] ?? null));
|
||||
}
|
||||
|
||||
protected function describeContainerDefinition(Definition $definition, array $options = [], ContainerBuilder $container = null): void
|
||||
protected function describeContainerDefinition(Definition $definition, array $options = [], ?ContainerBuilder $container = null): void
|
||||
{
|
||||
$this->writeDocument($this->getContainerDefinitionDocument($definition, $options['id'] ?? null, isset($options['omit_tags']) && $options['omit_tags'], isset($options['show_arguments']) && $options['show_arguments'], $container));
|
||||
}
|
||||
|
||||
protected function describeContainerAlias(Alias $alias, array $options = [], ContainerBuilder $container = null): void
|
||||
protected function describeContainerAlias(Alias $alias, array $options = [], ?ContainerBuilder $container = null): void
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($dom->importNode($this->getContainerAliasDocument($alias, $options['id'] ?? null)->childNodes->item(0), true));
|
||||
@@ -162,7 +162,7 @@ class XmlDescriptor extends Descriptor
|
||||
return $dom;
|
||||
}
|
||||
|
||||
private function getRouteDocument(Route $route, string $name = null): \DOMDocument
|
||||
private function getRouteDocument(Route $route, ?string $name = null): \DOMDocument
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($routeXML = $dom->createElement('route'));
|
||||
@@ -268,7 +268,7 @@ class XmlDescriptor extends Descriptor
|
||||
return $dom;
|
||||
}
|
||||
|
||||
private function getContainerServiceDocument(object $service, string $id, ContainerBuilder $container = null, bool $showArguments = false): \DOMDocument
|
||||
private function getContainerServiceDocument(object $service, string $id, ?ContainerBuilder $container = null, bool $showArguments = false): \DOMDocument
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
|
||||
@@ -288,7 +288,7 @@ class XmlDescriptor extends Descriptor
|
||||
return $dom;
|
||||
}
|
||||
|
||||
private function getContainerServicesDocument(ContainerBuilder $container, string $tag = null, bool $showHidden = false, bool $showArguments = false, callable $filter = null, string $id = null): \DOMDocument
|
||||
private function getContainerServicesDocument(ContainerBuilder $container, ?string $tag = null, bool $showHidden = false, bool $showArguments = false, ?callable $filter = null, ?string $id = null): \DOMDocument
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($containerXML = $dom->createElement('container'));
|
||||
@@ -318,7 +318,7 @@ class XmlDescriptor extends Descriptor
|
||||
return $dom;
|
||||
}
|
||||
|
||||
private function getContainerDefinitionDocument(Definition $definition, string $id = null, bool $omitTags = false, bool $showArguments = false, ContainerBuilder $container = null): \DOMDocument
|
||||
private function getContainerDefinitionDocument(Definition $definition, ?string $id = null, bool $omitTags = false, bool $showArguments = false, ?ContainerBuilder $container = null): \DOMDocument
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($serviceXML = $dom->createElement('definition'));
|
||||
@@ -418,7 +418,7 @@ class XmlDescriptor extends Descriptor
|
||||
/**
|
||||
* @return \DOMNode[]
|
||||
*/
|
||||
private function getArgumentNodes(array $arguments, \DOMDocument $dom, ContainerBuilder $container = null): array
|
||||
private function getArgumentNodes(array $arguments, \DOMDocument $dom, ?ContainerBuilder $container = null): array
|
||||
{
|
||||
$nodes = [];
|
||||
|
||||
@@ -466,7 +466,7 @@ class XmlDescriptor extends Descriptor
|
||||
return $nodes;
|
||||
}
|
||||
|
||||
private function getContainerAliasDocument(Alias $alias, string $id = null): \DOMDocument
|
||||
private function getContainerAliasDocument(Alias $alias, ?string $id = null): \DOMDocument
|
||||
{
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
$dom->appendChild($aliasXML = $dom->createElement('alias'));
|
||||
@@ -581,7 +581,7 @@ class XmlDescriptor extends Descriptor
|
||||
$callableXML->setAttribute('type', 'closure');
|
||||
|
||||
$r = new \ReflectionFunction($callable);
|
||||
if (str_contains($r->name, '{closure}')) {
|
||||
if (str_contains($r->name, '{closure')) {
|
||||
return $dom;
|
||||
}
|
||||
$callableXML->setAttribute('name', $r->name);
|
||||
|
||||
Reference in New Issue
Block a user