Skip to content

Commit

Permalink
Fix WEB_ROOT value on connector (could be bugged).
Browse files Browse the repository at this point in the history
Use of php realpath() could return False without verification,
Now fixed
  • Loading branch information
nil0x42 committed Nov 9, 2014
1 parent 8f121b2 commit 7a61cba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/tunnel/connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ function get_tmp_dir()
$tmp = str_replace("/", $sep, $rel);
$len = strlen($tmp);
if($tmp == substr($abs, -$len))
$R['WEB_ROOT']=substr($abs, 0, -$len);
$R['WEB_ROOT'] = substr($abs, 0, -$len);
}
}
}

$R['WEB_ROOT'] = @realpath($R['WEB_ROOT']);
if (($x = @realpath($R['WEB_ROOT'])) !== False)
$R['WEB_ROOT'] = $x;


// Determine WRITEABLE_WEBDIR.
Expand Down

0 comments on commit 7a61cba

Please sign in to comment.