Skip to content

Commit 1e94342

Browse files
committed
Remove spc.env.log due to potential secret leaks
1 parent afd6791 commit 1e94342

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/SPC/exception/ExceptionHandler.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,6 @@ public static function handleSPCException(SPCException $e): void
125125

126126
self::logError("\n----------------------------------------\n");
127127

128-
// put getenv info to log
129-
$env_log = fopen(SPC_ENV_LOG, 'a');
130-
$env_info = getenv();
131-
if ($env_info) {
132-
foreach ($env_info as $k => $v) {
133-
fwrite($env_log, $k . ' = ' . $v . PHP_EOL);
134-
}
135-
}
136-
137128
self::logError('⚠ The ' . ConsoleColor::cyan('console output log') . ConsoleColor::red(' is saved in ') . ConsoleColor::none(SPC_OUTPUT_LOG));
138129
if (file_exists(SPC_SHELL_LOG)) {
139130
self::logError('⚠ The ' . ConsoleColor::cyan('shell output log') . ConsoleColor::red(' is saved in ') . ConsoleColor::none(SPC_SHELL_LOG));

src/globals/defines.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@
9494
const SPC_LOGS_DIR = WORKING_DIR . DIRECTORY_SEPARATOR . 'log';
9595
const SPC_OUTPUT_LOG = SPC_LOGS_DIR . DIRECTORY_SEPARATOR . 'spc.output.log';
9696
const SPC_SHELL_LOG = SPC_LOGS_DIR . DIRECTORY_SEPARATOR . 'spc.shell.log';
97-
const SPC_ENV_LOG = SPC_LOGS_DIR . DIRECTORY_SEPARATOR . 'spc.env.log';
9897

9998
ConsoleLogger::$date_format = 'H:i:s';
10099
ConsoleLogger::$format = '[%date%] [%level_short%] %body%';

0 commit comments

Comments
 (0)