mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 00:22:15 +00:00
sanitizing env value before storing into the .env file
This commit is contained in:
@@ -226,9 +226,9 @@ if (! function_exists('setEnvironmentValue')) {
|
||||
if ($keyPosition) {
|
||||
$endOfLinePosition = strpos($str, "\n", $keyPosition);
|
||||
$oldLine = substr($str, $keyPosition, $endOfLinePosition - $keyPosition);
|
||||
$str = str_replace($oldLine, "{$envKey}={$envValue}", $str);
|
||||
$str = str_replace($oldLine, "{$envKey}=\"{$envValue}\"", $str);
|
||||
} else {
|
||||
$str .= "\n$envKey=$envValue";
|
||||
$str .= "\n$envKey=\"$envValue\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user