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:
parent
c3b6ef7ad2
commit
eefdaccd39
2 changed files with 4 additions and 3 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
--------------------------------------------------------------------------
|
||||
v.3.6-Alpha2
|
||||
- Properly escape config values when writing ampache.cfg.php
|
||||
- Fixed session persistence with auth disabled (reported by Nathanael
|
||||
Anderson)
|
||||
- Fixed item count retention for Advanced Random (reported by USAF_Pride)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue