Download src/php/php-src/tests/security/bug76359.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/security/bug76359.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/security/bug76359.phpt
-
curl -L -o bug76359.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/security/bug76359.phpt
491 Bytes
| --TEST-- | |
| Bug #76359 (open_basedir bypass through adding "..") | |
| --FILE-- | |
| ini_set('open_basedir', __DIR__); | |
| mkdir(__DIR__ . "/bug76359"); | |
| chdir(__DIR__ . "/bug76359"); | |
| var_dump(ini_set('open_basedir', ini_get('open_basedir') . PATH_SEPARATOR . "..")); | |
| chdir(".."); | |
| chdir(".."); | |
| --EXPECTF-- | |
| string(%d) "%ssecurity" | |
| Warning: chdir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (%s) in %s on line %d | |
| --CLEAN-- | |
| @rmdir(__DIR__ . "/bug76359"); | |