diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-05-04 13:29:38 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-05-04 13:30:07 +0300 |
| commit | ec12a514a28edb446a84d949ec7d1cda2bbcc349 (patch) | |
| tree | 2ce56ab1ed55e545a99aeaaec79c636b19b02501 /classes/Config.php | |
| parent | 5eba9fd11617e7c3dc0057f45dc10990d86fe90d (diff) | |
Revert "bring back cleanup of potentially sensitive environment variables but exclude CLI SAPI to prevent updater failures"
Breaks OIDC
This reverts commit 247efe3137fadf5d74ab254cf4c80957624abc90.
Diffstat (limited to 'classes/Config.php')
| -rw-r--r-- | classes/Config.php | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/classes/Config.php b/classes/Config.php index 6e16f269b..c413317be 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -275,13 +275,6 @@ class Config { if (isset(self::_DEFAULTS[$const])) { $override = getenv(self::_ENVVAR_PREFIX . $const); - // cleanup original env var after importing (unless it's a background process) - if (php_sapi_name() != "cli") { - putenv(self::_ENVVAR_PREFIX . $const . '='); - unset($_ENV[self::_ENVVAR_PREFIX . $const]); - unset($_SERVER[self::_ENVVAR_PREFIX . $const]); - } - list ($defval, $deftype) = self::_DEFAULTS[$const]; $this->params[$cvalue] = [ self::cast_to($override !== false ? $override : $defval, $deftype), $deftype ]; @@ -440,13 +433,6 @@ class Config { private function _add(string $param, string $default, int $type_hint): void { $override = getenv(self::_ENVVAR_PREFIX . $param); - // cleanup original env var after importing (unless it's a background process) - if (php_sapi_name() != "cli") { - putenv(self::_ENVVAR_PREFIX . $param . '='); - unset($_ENV[self::_ENVVAR_PREFIX . $param]); - unset($_SERVER[self::_ENVVAR_PREFIX . $param]); - } - $this->params[$param] = [ self::cast_to($override !== false ? $override : $default, $type_hint), $type_hint ]; } |