mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix .env migration unescaped $ in passwords (#8688)
* Fix .env migration unescaped $ in passwords Better fix for timezone in Laravel * Simpler change
This commit is contained in:
@@ -136,7 +136,8 @@ class ComposerHelper
|
|||||||
|
|
||||||
if (strpos($content, "$key=") !== false) {
|
if (strpos($content, "$key=") !== false) {
|
||||||
// only replace ones that aren't already set for safety and uncomment
|
// only replace ones that aren't already set for safety and uncomment
|
||||||
$content = preg_replace("/#?$key=\n/", "$key=$value\n", $content);
|
// escape $ in the replacement
|
||||||
|
$content = preg_replace("/#?$key=\n/", addcslashes("$key=$value\n", '$'), $content);
|
||||||
} else {
|
} else {
|
||||||
$content .= "$key=$value\n";
|
$content .= "$key=$value\n";
|
||||||
}
|
}
|
||||||
|
@@ -64,7 +64,7 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'timezone' => null, // set to null to avoid setting timezone
|
'timezone' => ini_get('date.timezone'), // use existing timezone
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user