Skip to content

Commit a02ec6b

Browse files
author
Till Brehm
committed
#5102
1 parent d09f4db commit a02ec6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/lib/classes/functions.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ public function htmlentities($value) {
480480

481481
// Function to check paths before we use it as include. Use with absolute paths only.
482482
public function check_include_path($path) {
483-
if(strpos($path,'//') === false) die('Include path seems to be an URL: '.$this->htmlentities($path));
484-
if(strpos($path,'..') === false) die('Two dots are not allowed in include path: '.$this->htmlentities($path));
483+
if(strpos($path,'//') !== false) die('Include path seems to be an URL: '.$this->htmlentities($path));
484+
if(strpos($path,'..') !== false) die('Two dots are not allowed in include path: '.$this->htmlentities($path));
485485
if(!preg_match("/^[a-zA-Z0-9_\/\.\-]+$/", $path)) die('Wrong chars in include path: '.$this->htmlentities($path));
486486
$path = realpath($path);
487487
if($path == '') die('Include path does not exist.');

0 commit comments

Comments
 (0)