From 4d3b6c18bbb43c95974ef2cd892f94209cffb589 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 23 Jun 2014 19:49:05 +0200 Subject: Rebuild AD config modules if server IP changed... Also add vmchooser URL to getconfig, fix shell string escaping --- apis/getconfig.inc.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'apis') diff --git a/apis/getconfig.inc.php b/apis/getconfig.inc.php index 0a8db6be..84393dbc 100644 --- a/apis/getconfig.inc.php +++ b/apis/getconfig.inc.php @@ -1,8 +1,15 @@ fetch(PDO::FETCH_ASSOC)) { if (is_null($row['value'])) $row['value'] = $row['defaultvalue']; - echo $row['setting'] . "='" . str_replace("'", "'\"'\"'", $row['value']) . "'\n"; + echo $row['setting'] . "='" . escape($row['value']) . "'\n"; } + // Additional "intelligent" config // Remote log URL echo "SLX_REMOTE_LOG='http://" . escape($_SERVER['SERVER_ADDR']) . "/slxadmin/api.php?do=clientlog'\n"; +// vm list url +echo "SLX_VMCHOOSER_BASE_URL='http://" . escape($_SERVER['SERVER_ADDR']) . "/vmchooser/'\n"; // VMStore path and type $vmstore = Property::getVmStoreConfig(); -- cgit v1.2.3-55-g7522