From a02ec6b0305689c14dbd06237b9d56c8f90969ef Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 17 Aug 2018 18:22:58 +0200
Subject: [PATCH] #5102

---
 interface/lib/classes/functions.inc.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php
index 878fc5d44a..28ab9ce384 100644
--- a/interface/lib/classes/functions.inc.php
+++ b/interface/lib/classes/functions.inc.php
@@ -480,8 +480,8 @@ class functions {
 	
 	// Function to check paths before we use it as include. Use with absolute paths only.
 	public function check_include_path($path) {
-		if(strpos($path,'//') === false) die('Include path seems to be an URL: '.$this->htmlentities($path));
-		if(strpos($path,'..') === false) die('Two dots are not allowed in include path: '.$this->htmlentities($path));
+		if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path));
+		if(strpos($path,'..') !== false) die('Two dots are not allowed in include path: '.$this->htmlentities($path));
 		if(!preg_match("/^[a-zA-Z0-9_\/\.\-]+$/", $path)) die('Wrong chars in include path: '.$this->htmlentities($path));
 		$path = realpath($path);
 		if($path == '') die('Include path does not exist.');
-- 
GitLab