Skip to content

Commit

Permalink
Don't forbid use of assert in PHP 8+
Browse files Browse the repository at this point in the history
  • Loading branch information
bohwaz authored and jvoisin committed Mar 24, 2024
1 parent 6fe3815 commit f558f62
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/generate_rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ function help($name) {
'posix_kill', 'posix_mkfifo', 'posix_setpgid', 'posix_setsid', 'posix_setuid',
'posix_setgid', 'posix_uname', 'proc_close', 'proc_nice', 'proc_open',
'proc_terminate', 'proc_open', 'proc_get_status', 'dl', 'pnctl_exec',
'pnctl_fork', 'assert', 'system', 'curl_exec', 'curl_multi_exec', 'function_exists'];
'pnctl_fork', 'system', 'curl_exec', 'curl_multi_exec', 'function_exists'];

// In PHP < 8.0x you could execute code using assert()
if (PHP_VERSION_ID < 80000) {
$functions_blacklist[] = 'assert';
}

$extensions = ['php', 'php7', 'php5', 'inc'];

Expand Down

0 comments on commit f558f62

Please sign in to comment.