From 08cc7f673c377bf88897743e340097e93f1e95f4 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 16 Jan 2013 09:30:05 -0500
Subject: [PATCH] - Changed regex for redirect path (Web sites, subdomains, vhost subdomains, alias domains) and web folder (vhost subdomains) so that ".." is not allowed (in order to prevent path traversals). - nginx: don't allow folders for proxy redirects (subdomains and alias domains); URL is required. - nginx: modified rewriting.

---
 interface/lib/classes/getconf.inc.php |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/interface/lib/classes/getconf.inc.php b/interface/lib/classes/getconf.inc.php
index 1882061..ad2a302 100644
--- a/interface/lib/classes/getconf.inc.php
+++ b/interface/lib/classes/getconf.inc.php
@@ -37,7 +37,7 @@
 
 		if(!isset($this->config[$server_id])) {
 			$app->uses('ini_parser');
-			$server_id = intval($server_id);
+			$server_id = $app->functions->intval($server_id);
 			$server = $app->db->queryOneRecord('SELECT config FROM server WHERE server_id = '.$server_id);
 			$this->config[$server_id] = $app->ini_parser->parse_ini_string(stripslashes($server['config']));
 		}
@@ -47,12 +47,10 @@
 	public function get_global_config($section = '') {
 		global $app;
 		
-		if(isset($this->config['global'])) {
+		if(!isset($this->config['global'])) {
 			$app->uses('ini_parser');
 			$tmp = $app->db->queryOneRecord('SELECT config FROM sys_ini WHERE sysini_id = 1');
 			$this->config['global'] = $app->ini_parser->parse_ini_string(stripslashes($tmp['config']));
-		} else {
-			$this->config['global'] = NULL;
 		}
 		return ($section == '') ? $this->config['global'] : $this->config['global'][$section];
 	}

--
Gitblit v1.9.1