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:
Benjamin Dalsass
2025-08-06 08:54:56 +02:00
committed by GitHub
parent 603340b852
commit cdbcd14767
608 changed files with 5020 additions and 3793 deletions

View File

@@ -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();
}
}