realpath_turbo icon indicating copy to clipboard operation
realpath_turbo copied to clipboard

realpath_turbo.disable_dangerous_functions doesn't work

Open remicollet opened this issue 4 years ago • 6 comments

Try,

diff --git a/tests/012.phpt b/tests/012.phpt
index c0c7ec3..c2fb8f9 100644
--- a/tests/012.phpt
+++ b/tests/012.phpt
@@ -10,6 +10,9 @@ realpath_turbo.disable_dangerous_functions=1
 <?php
 var_dump(ini_get("realpath_turbo.disable_dangerous_functions"));
 var_dump(ini_get("disable_functions"));
+$l = __DIR__ . '/testlink';
+var_dump(symlink(PHP_BINARY, $l));
+var_dump(@unlink($l));
 --EXPECTF--
 string(1) "1"
 string(17) "link,symlink,date"

symlink is called without any blocker.

Both new var_dump output "bool(true)", while false (failure) + a disabled warning is expected.

remicollet avatar Sep 21 '20 15:09 remicollet

diff --git a/tests/012.phpt b/tests/012.phpt
index c0c7ec3..c2fb8f9 100644
--- a/tests/012.phpt
+++ b/tests/012.phpt
@@ -10,6 +10,9 @@ realpath_turbo.disable_dangerous_functions=1
 <?php
 var_dump(ini_get("realpath_turbo.disable_dangerous_functions"));
 var_dump(ini_get("disable_functions"));
+$l = __DIR__ . '/testlink';
+var_dump(symlink(PHP_BINARY, $l));
+var_dump(@unlink($l));
 --EXPECTF--
 string(1) "1"
 string(17) "link,symlink,date"

szepeviktor avatar Sep 21 '20 15:09 szepeviktor

@Whissi Has this been incorporated into core or reviewed yet? Seemed like it was stuck in pull request stage but also seems relevant if you want both speed + security.

lancedockins avatar Jan 06 '21 02:01 lancedockins

I am sorry but I had no time for this yet. Hopefully next week.

Whissi avatar Jan 06 '21 14:01 Whissi

Hi @Whissi. First, thanks for your work in this project.

We are having problems with PHP slow in NFS due to lstats. Is there any chance of this PR being reviewed and applied?

ferfebles avatar Mar 06 '23 11:03 ferfebles

Yeah, I am using a version with the patches remi provided for some months now without any problems. I'll do my best to merge everything within next two weeks.

Whissi avatar Mar 06 '23 16:03 Whissi

Great!!

ferfebles avatar Mar 07 '23 06:03 ferfebles