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) {
|
||||
// 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 {
|
||||
$content .= "$key=$value\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user