Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc5f856

Browse filesBrowse files
[FrameworkBundle] Add commented base64 version of secrets' keys
1 parent 63e4269 commit fc5f856
Copy full SHA for fc5f856

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,10 @@ private function loadKeys(): void
199199

200200
private function export(string $file, string $data): void
201201
{
202+
$b64 = 'encrypt.public' === $file || 'decrypt.private' === $file ? '// SYMFONY_DECRYPTION_SECRET='.base64_encode($data)."\n" : '';
202203
$name = basename($this->pathPrefix.$file);
203204
$data = str_replace('%', '\x', rawurlencode($data));
204-
$data = sprintf("<?php // %s on %s\n\nreturn \"%s\";\n", $name, date('r'), $data);
205+
$data = sprintf("<?php // %s on %s\n\n%sreturn \"%s\";\n", $name, date('r'), $b64, $data);
205206

206207
$this->createSecretsDir();
207208

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.