mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +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:
@@ -34,7 +34,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass
|
||||
private array $notInlinableIds = [];
|
||||
private ?ServiceReferenceGraph $graph = null;
|
||||
|
||||
public function __construct(AnalyzeServiceReferencesPass $analyzingPass = null)
|
||||
public function __construct(?AnalyzeServiceReferencesPass $analyzingPass = null)
|
||||
{
|
||||
$this->analyzingPass = $analyzingPass;
|
||||
}
|
||||
@@ -73,6 +73,9 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass
|
||||
if (!$this->graph->hasNode($id)) {
|
||||
continue;
|
||||
}
|
||||
if ($definition->isPublic()) {
|
||||
$this->connectedIds[$id] = true;
|
||||
}
|
||||
foreach ($this->graph->getNode($id)->getOutEdges() as $edge) {
|
||||
if (isset($notInlinedIds[$edge->getSourceNode()->getId()])) {
|
||||
$this->currentId = $id;
|
||||
@@ -189,17 +192,13 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($definition->isPublic()) {
|
||||
if ($definition->isPublic()
|
||||
|| $this->currentId === $id
|
||||
|| !$this->graph->hasNode($id)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->graph->hasNode($id)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->currentId === $id) {
|
||||
return false;
|
||||
}
|
||||
$this->connectedIds[$id] = true;
|
||||
|
||||
$srcIds = [];
|
||||
@@ -224,6 +223,8 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->container->getDefinition($srcId)->isShared();
|
||||
$srcDefinition = $this->container->getDefinition($srcId);
|
||||
|
||||
return $srcDefinition->isShared() && !$srcDefinition->isLazy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user