summaryrefslogtreecommitdiffstats
path: root/lib/debug.lib.php
diff options
context:
space:
mode:
authorStephen Shkardoon <ss23@ss23.geek.nz>2011-09-14 21:43:34 +1000
committerPaul Arthur <paul.arthur@flowerysong.com>2011-09-19 13:47:04 -0400
commiteefdaccd394417d82a28e18b863516af25014349 (patch)
tree8027b0f79cb78e43eb800734a8bf7d892d2a00d8 /lib/debug.lib.php
parentc3b6ef7ad2e888fd228f62ed3cef6f7d55070a84 (diff)
downloadampache-eefdaccd394417d82a28e18b863516af25014349.tar.gz
ampache-eefdaccd394417d82a28e18b863516af25014349.tar.bz2
ampache-eefdaccd394417d82a28e18b863516af25014349.zip
Escape config values when outputting the config file
Allows for odd characters in the database username and password.
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r--lib/debug.lib.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php
index bacdd19e..44d427a3 100644
--- a/lib/debug.lib.php
+++ b/lib/debug.lib.php
@@ -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