mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Escape escape-char, too. rmvd warning (since \ should be possible now)
This commit is contained in:
@@ -118,7 +118,8 @@ class Core
|
||||
$database_file = file_get_contents($template_path);
|
||||
|
||||
// Sanitize DB Password from single quotes
|
||||
$sanitized_db_pwd = preg_replace("/\'/i",'\\\'',$data['db_password']);
|
||||
$sanitized_db_pwd = preg_replace("/\\/i",'\\\\',$data['db_password']); // Escape the Escape char ( '\' becomes '\\' )
|
||||
$sanitized_db_pwd = preg_replace("/\'/i",'\\\'',$data['db_password']); // Escape the ' ( ' becomes \' )
|
||||
|
||||
$new = str_replace("%HOSTNAME%", $data['db_hostname'], $database_file);
|
||||
$new = str_replace("%USERNAME%", $data['db_username'], $new);
|
||||
|
||||
Reference in New Issue
Block a user