From 2b91b03d06d6d30cc120406cf0e98bbeaaec5717 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 16 Jul 2013 10:13:37 -0400
Subject: [PATCH] - Fixed: FS#3043 - Default servers and client template 

---
 server/lib/classes/system.inc.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index 0b5e458..f6b52cf 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -608,6 +608,9 @@
 			exec($cmd, $output, $return_var);
 			if($return_var != 0 || !$output[0]) return false;
 			list($f1, $f2, $f3, $f4) = explode(':', $output[0]);
+			$f2 = trim($f2);
+			$f3 = trim($f3);
+			$f4 = trim($f4);
 			if($f4 != ''){
 				$members = explode(',', $f4);
 			} else {
@@ -777,7 +780,7 @@
 		if(substr($path,0,1) != '/') return false;
 		
 		//* We allow only some characters in the path
-		if(!preg_match('/[a-zA-Z0-9_\.\-]{1,}/',$path)) return false;
+		if(!preg_match('/^\/[a-zA-Z0-9_\/\.\-]{1,}$/',$path)) return false;
 		
 		//* Check path for symlinks
 		$path_parts = explode('/',$path);

--
Gitblit v1.9.1