bug #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
-------
e31f8c52db
[FrameworkBundle] Fixed file operations in Sodium vault seal
This commit is contained in:
commit
a0496bd748
@ -90,7 +90,7 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
|
||||
$list = $this->list();
|
||||
$list[$name] = null;
|
||||
uksort($list, 'strnatcmp');
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
|
||||
|
||||
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
|
||||
}
|
||||
@ -142,7 +142,7 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
|
||||
|
||||
$list = $this->list();
|
||||
unset($list[$name]);
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
|
||||
|
||||
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
|
||||
|
||||
|
Reference in New Issue
Block a user