use !== false rather than === true

This commit is contained in:
Andrew Bauer 2017-01-25 09:26:07 -06:00
parent 6189d2670c
commit dbd73690b2
1 changed files with 2 additions and 1 deletions

View File

@ -81,8 +81,9 @@ if ( empty($_REQUEST['path']) )
} else {
$dir_events = realpath(ZM_DIR_EVENTS);
$path = realpath($dir_events . '/' . $_REQUEST['path']);
$pos = strpos($path, $dir_events);
if(strpos($path, $dir_events) == 0) {
if($pos == 0 && $pos !== false) {
if ( !empty($user['MonitorIds']) ) {
$imageOk = false;
$pathMonId = substr( $path, 0, strspn( $path, "1234567890" ) );