-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix bug #4327 * fix bug #4327 * fix bug #4327 * unit test * 代码格式 * 单元测试 * 修复无符号和有符号之间的比较 * unit test * unit test * open_basedir * support open_basedir * support open_basedir * (void *)buf * (char *) memchr(buf, DEFAULT_SLASH, dir_len)) * clang-format
- Loading branch information
1 parent
6345fe8
commit 1c02a87
Showing
2 changed files
with
111 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
support open_basedir config | ||
--SKIPIF-- | ||
<?php | ||
require __DIR__ . '/../../include/skipif.inc'; | ||
?> | ||
--FILE-- | ||
<?php | ||
use function Swoole\Coroutine\run; | ||
use function Swoole\Coroutine\go; | ||
|
||
run(function() { | ||
ini_set("open_basedir","/tmp/:/tmp/tes"); | ||
mkdir("/home/test/",0755); | ||
var_dump(mkdir("/tmp/test/",0755)); | ||
var_dump(mkdir("/tmp/test1/",0755)); | ||
var_dump(mkdir("/tmp/test/test",0755, true)); | ||
rmdir("/tmp/test/test"); | ||
rmdir("/tmp/test/"); | ||
rmdir("/tmp/test1/"); | ||
}); | ||
?> | ||
--EXPECTF-- | ||
|
||
Warning: mkdir(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line 7 | ||
bool(true) | ||
bool(true) | ||
bool(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters