summaryrefslogtreecommitdiff
path: root/scripts/generate_rules.php
diff options
context:
space:
mode:
authorbohwaz2024-03-24 19:07:25 +0100
committerJulien Voisin2024-03-24 20:39:47 +0100
commitf558f62469b06098a77f95579dcf0ba5675c801c (patch)
treeaa10799759c3813579d234f42aa8aa7c5a0160a6 /scripts/generate_rules.php
parent6fe3815271a50329a2ba0aa492bb2c9a9820b962 (diff)
Don't forbid use of assert in PHP 8+
Diffstat (limited to 'scripts/generate_rules.php')
-rw-r--r--scripts/generate_rules.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/generate_rules.php b/scripts/generate_rules.php
index 1824e3f..d35c72f 100644
--- a/scripts/generate_rules.php
+++ b/scripts/generate_rules.php
@@ -12,7 +12,12 @@ $functions_blacklist = ['shell_exec', 'exec', 'passthru', 'php_uname', 'popen',
12 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', 'posix_setuid', 12 'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', 'posix_setuid',
13 'posix_setgid', 'posix_uname', 'proc_close', 'proc_nice', 'proc_open', 13 'posix_setgid', 'posix_uname', 'proc_close', 'proc_nice', 'proc_open',
14 'proc_terminate', 'proc_open', 'proc_get_status', 'dl', 'pnctl_exec', 14 'proc_terminate', 'proc_open', 'proc_get_status', 'dl', 'pnctl_exec',
15 'pnctl_fork', 'assert', 'system', 'curl_exec', 'curl_multi_exec', 'function_exists']; 15 'pnctl_fork', 'system', 'curl_exec', 'curl_multi_exec', 'function_exists'];
16
17// In PHP < 8.0x you could execute code using assert()
18if (PHP_VERSION_ID < 80000) {
19 $functions_blacklist[] = 'assert';
20}
16 21
17$extensions = ['php', 'php7', 'php5', 'inc']; 22$extensions = ['php', 'php7', 'php5', 'inc'];
18 23