Skip to content

Commit d30f8d6

Browse files
nicolas-grekasfabpot
authored andcommitted
[FrameworkBundle] Add commented base64 version of secrets' keys
1 parent 70de932 commit d30f8d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Secrets/SodiumVault.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ private function loadKeys(): void
200200

201201
private function export(string $file, string $data): void
202202
{
203+
$b64 = 'decrypt.private' === $file ? '// SYMFONY_DECRYPTION_SECRET='.base64_encode($data)."\n" : '';
203204
$name = basename($this->pathPrefix.$file);
204205
$data = str_replace('%', '\x', rawurlencode($data));
205-
$data = sprintf("<?php // %s on %s\n\nreturn \"%s\";\n", $name, date('r'), $data);
206+
$data = sprintf("<?php // %s on %s\n\n%sreturn \"%s\";\n", $name, date('r'), $b64, $data);
206207

207208
$this->createSecretsDir();
208209

0 commit comments

Comments
 (0)