diff options
-rw-r--r-- | config/haproxy/haproxy.inc | 6 | ||||
-rwxr-xr-x | config/haproxy/haproxy_frontends_edit.php | 2 | ||||
-rwxr-xr-x | config/haproxy/haproxy_global.php | 2 | ||||
-rwxr-xr-x | config/haproxy/haproxy_servers_edit.php | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc index 35f8ecac..29827d39 100644 --- a/config/haproxy/haproxy.inc +++ b/config/haproxy/haproxy.inc @@ -109,7 +109,7 @@ function haproxy_configure() { if(is_array($a_global)) { fwrite ($fd, "global\n"); if($a_global['advanced']) - fwrite ($fd, "\t" . str_replace("\n", " ", $a_global['advanced']) . "\n"); + fwrite ($fd, "\t" . str_replace("\n", " ", base64deode($a_global['advanced'])) . "\n"); fwrite ($fd, "\tmaxconn\t\t\t".$a_global['maxconn']."\n"); if($a_global['remotesyslog']) fwrite ($fd, "\tlog\t\t\t{$a_global['remotesyslog']}\n"); @@ -153,7 +153,7 @@ function haproxy_configure() { // Advanced pass trhu if($backend['advanced']) - fwrite ($fd, "\t" . str_replace("\n", " ", $backend['advanced']) . "\n"); + fwrite ($fd, "\t" . str_replace("\n", " ", base64decode($backend['advanced'])) . "\n"); // https is an alias for tcp for clarity purpouses if(strtolower($backend['type']) == "https") { @@ -234,7 +234,7 @@ function haproxy_configure() { $server_ports[] = $server['port']; } if($server['advanced']) - $advanced_txt = " " . str_replace("\n", " ", $server['advanced']); + $advanced_txt = " " . str_replace("\n", " ", base64decode($server['advanced'])); else $advanced_txt = ""; foreach($server_ports as $pport) diff --git a/config/haproxy/haproxy_frontends_edit.php b/config/haproxy/haproxy_frontends_edit.php index 1986b176..1517c380 100755 --- a/config/haproxy/haproxy_frontends_edit.php +++ b/config/haproxy/haproxy_frontends_edit.php @@ -70,7 +70,7 @@ if (isset($id) && $a_backend[$id]) { $pconfig['client_timeout'] = $a_backend[$id]['client_timeout']; $pconfig['port'] = $a_backend[$id]['port']; $pconfig['a_acl']=&$a_backend[$id]['ha_acls']['item']; - $pconfig['advanced'] = $a_backend[$id]['advanced']; + $pconfig['advanced'] = base64encode($a_backend[$id]['advanced']); } diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php index 52e1c5be..0f5a5ee8 100755 --- a/config/haproxy/haproxy_global.php +++ b/config/haproxy/haproxy_global.php @@ -77,7 +77,7 @@ if ($_POST) { $config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost3'] ? $_POST['synchost3'] : false; $config['installedpackages']['haproxy']['remotesyslog'] = $_POST['remotesyslog'] ? $_POST['remotesyslog'] : false; $config['installedpackages']['haproxy']['syncpassword'] = $_POST['syncpassword'] ? $_POST['syncpassword'] : false; - $config['installedpackages']['haproxy']['advanced'] = $_POST['advanced'] ? $_POST['advanced'] : false; + $config['installedpackages']['haproxy']['advanced'] = base64encode($_POST['advanced']) ? $_POST['advanced'] : false; touch($d_haproxyconfdirty_path); write_config(); } diff --git a/config/haproxy/haproxy_servers_edit.php b/config/haproxy/haproxy_servers_edit.php index 1803b5da..25d8e69a 100755 --- a/config/haproxy/haproxy_servers_edit.php +++ b/config/haproxy/haproxy_servers_edit.php @@ -123,7 +123,7 @@ if ($_POST) { update_if_changed("weight", $server['weight'], $_POST['weight']); update_if_changed("status", $server['status'], $_POST['status']); update_if_changed("address", $server['address'], $_POST['address']); - update_if_changed("advanced", $server['advanced'], $_POST['advanced']); + update_if_changed("advanced", $server['advanced'], base64encode($_POST['advanced'])); if (isset($id) && $a_server[$id]) { $a_server[$id] = $server; |