-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to specify the allowed "php" wrapper types #490
Conversation
Please GCC: In file included from /usr/include/php/20220829/Zend/zend.h:30, from /usr/include/php/20220829/main/php.h:31, from /usr/include/php/20220829/main/SAPI.h:20, from src/php_snuffleupagus.h:37, from src/sp_ifilter.c:1: src/sp_pcre_compat.h: In function 'sp_regexp_compile': src/sp_pcre_compat.h:38:36: warning: '__zend_calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1); | ^~~~~~~~~ /usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc' 199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size))) | ^~~~~ src/sp_pcre_compat.h:38:36: note: earlier argument should specify number of elements, later size of each element 38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1); | ^~~~~~~~~ /usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc' 199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size))) | ^~~~~
Avoid the configure step each time during development.
In addition of the current possibility to filter wrappers by their protocol name, also add the option to filter the "php" wrapper by the requested kind. Especially the 'filter' backend can be disabled that way.
Wow, that's a pretty neat PR, thanks! |
Not sure this is needed, but better safe than sorry.
In addition when the |
I'm not sure limiting the depth will provide meaningful security improvements, nor that it'll be used to be honest :/ |
This PR looks good to me, anything specific you're waiting on to mark it "Ready for review"? |
Merged, thanks <3 |
In addition of the current possibility to filter wrappers by their protocol name, also add the option to filter the "php" wrapper by the requested kind.
Especially the
filter
backend can be disabled that way.See https://www.php.net/manual/en/wrappers.php.php and https://github.com/ambionics/cnext-exploits.