Skip to content

Commit a0496bd

Browse files
committed
bug symfony#42079 [FrameworkBundle] Fixed file operations in Sodium vault seal (javiereguiluz)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Fixed file operations in Sodium vault seal | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- e31f8c5 [FrameworkBundle] Fixed file operations in Sodium vault seal
2 parents 7253299 + e31f8c5 commit a0496bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function seal(string $name, string $value): void
9090
$list = $this->list();
9191
$list[$name] = null;
9292
uksort($list, 'strnatcmp');
93-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
93+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
9494

9595
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
9696
}
@@ -142,7 +142,7 @@ public function remove(string $name): bool
142142

143143
$list = $this->list();
144144
unset($list[$name]);
145-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
145+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
146146

147147
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
148148

0 commit comments

Comments
 (0)