1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-05 10:49:37 +02:00

Escape config values when outputting the config file

Allows for odd characters in the database username and password.
This commit is contained in:
Stephen Shkardoon 2011-09-14 21:43:34 +10:00 committed by Paul Arthur
parent c3b6ef7ad2
commit eefdaccd39
2 changed files with 4 additions and 3 deletions

View file

@ -261,7 +261,7 @@ function check_override_memory() {
$new_limit = ($current_memory+16) . "M";
/* Bump it by 16 megs (for getid3)*/
if (!ini_set(memory_limit,$new_limit)) {
if (!ini_set('memory_limit',$new_limit)) {
return false;
}
@ -357,10 +357,10 @@ function generate_config($current) {
/* Put in the current value */
if ($key == 'config_version') {
$line = $key . ' = ' . $value;
$line = $key . ' = ' . addslashes($value);
}
elseif (isset($current[$key])) {
$line = $key . ' = "' . $current[$key] . '"';
$line = $key . ' = "' . addslashes($current[$key]) . '"';
unset($current[$key]);
} // if set