php-bypass-disable-functions icon indicating copy to clipboard operation
php-bypass-disable-functions copied to clipboard

Doesn't work on php8

Open netbsdis opened this issue 1 year ago • 1 comments

Hello,

I've tried with php-8.2.10 (on NetBSD) and found that, contrary to php-7.4.11, a disabled function system() is not visible at all:

php 7:

php7maschine$ php --rf system 
Function [ <internal:standard> function system ] {

  - Parameters [2] {
    Parameter #0 [ <required> $command ]
    Parameter #1 [ <optional> &$return_value ]
  }
}

php7machine$ php -d disable_functions=system --rf system
Function [ <internal:standard> function system ] {
}
php7maschine$

php8

php8machine$ php --rf system
PHP Warning:  Module "curl" is already loaded in Unknown on line 0
PHP Warning:  Module "pgsql" is already loaded in Unknown on line 0
Function [ <internal:standard> function system ] {

  - Parameters [2] {
    Parameter #0 [ <required> string $command ]
    Parameter #1 [ <optional> &$result_code = null ]
  }
  - Return [ string|false ]
}

php8machine$ php -d disable_functions=system --rf system
PHP Warning:  Module "curl" is already loaded in Unknown on line 0
PHP Warning:  Module "pgsql" is already loaded in Unknown on line 0
Exception: Function system() does not exist
php8machine$


does this address your complaint?

netbsdis avatar Dec 29 '23 11:12 netbsdis

Same on Linux (Debian)

netbsdis avatar Jan 29 '24 09:01 netbsdis