Skip to content

Commit e062332

Browse files
authored
Merge pull request #20 from wolfgang42/patch-1
Fix for upload_tmp_dir test
2 parents a09eab2 + 28c87c0 commit e062332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PhpSecInfo/Test/Core/upload_tmp_dir.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function _execTest()
7171
if ($perms === false) {
7272
return PHPSECINFO_TEST_RESULT_WARN;
7373
} else if ($this->current_value
74-
&& !preg_match("|" . PHPSECINFO_TEST_COMMON_TMPDIR . "/?|", $this->current_value)
74+
&& !preg_match("%^" . PHPSECINFO_TEST_COMMON_TMPDIR . "(/|$)%", $this->current_value)
7575
&& !($perms & 0x0004)
7676
&& !($perms & 0x0002)
7777
) {
@@ -101,4 +101,4 @@ function _setMessages()
101101
upload_tmp_dir to a non-world-readable directory');
102102
}
103103

104-
}
104+
}

0 commit comments

Comments
 (0)