diff options
| author | Christian Göttsche | 2024-05-27 21:33:00 +0200 |
|---|---|---|
| committer | jvoisin | 2024-06-09 17:16:16 +0200 |
| commit | c7ce5c3528e8da8762e6e7067001549e109397ba (patch) | |
| tree | 4c9606730af25a8f893193b7cc5cb718a20c3f35 /src/snuffleupagus.c | |
| parent | 849252c6a48b428dde3ad8930b40a2bdf9874cb7 (diff) | |
Add option to specify the allowed "php" wrapper types
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.
Diffstat (limited to 'src/snuffleupagus.c')
| -rw-r--r-- | src/snuffleupagus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index e549692..8c09a37 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -113,6 +113,7 @@ static PHP_GINIT_FUNCTION(snuffleupagus) { | |||
| 113 | SP_INIT_NULL(config_eval.blacklist); | 113 | SP_INIT_NULL(config_eval.blacklist); |
| 114 | SP_INIT_NULL(config_eval.whitelist); | 114 | SP_INIT_NULL(config_eval.whitelist); |
| 115 | SP_INIT_NULL(config_wrapper.whitelist); | 115 | SP_INIT_NULL(config_wrapper.whitelist); |
| 116 | SP_INIT_NULL(config_wrapper.php_stream_allowlist); | ||
| 116 | #undef SP_INIT_NULL | 117 | #undef SP_INIT_NULL |
| 117 | } | 118 | } |
| 118 | 119 | ||
| @@ -175,6 +176,7 @@ static PHP_GSHUTDOWN_FUNCTION(snuffleupagus) { | |||
| 175 | FREE_LST(config_eval.blacklist); | 176 | FREE_LST(config_eval.blacklist); |
| 176 | FREE_LST(config_eval.whitelist); | 177 | FREE_LST(config_eval.whitelist); |
| 177 | FREE_LST(config_wrapper.whitelist); | 178 | FREE_LST(config_wrapper.whitelist); |
| 179 | FREE_LST(config_wrapper.php_stream_allowlist); | ||
| 178 | #undef FREE_LST | 180 | #undef FREE_LST |
| 179 | 181 | ||
| 180 | 182 | ||
| @@ -388,6 +390,7 @@ static void dump_config(void) { | |||
| 388 | add_assoc_bool(&arr, SP_TOKEN_SLOPPY_COMPARISON "." SP_TOKEN_ENABLE, SPCFG(sloppy).enable); | 390 | add_assoc_bool(&arr, SP_TOKEN_SLOPPY_COMPARISON "." SP_TOKEN_ENABLE, SPCFG(sloppy).enable); |
| 389 | 391 | ||
| 390 | ADD_ASSOC_SPLIST(&arr, SP_TOKEN_ALLOW_WRAPPERS "." SP_TOKEN_LIST, SPCFG(wrapper).whitelist); | 392 | ADD_ASSOC_SPLIST(&arr, SP_TOKEN_ALLOW_WRAPPERS "." SP_TOKEN_LIST, SPCFG(wrapper).whitelist); |
| 393 | ADD_ASSOC_SPLIST(&arr, SP_TOKEN_ALLOW_WRAPPERS "." SP_TOKEN_ALLOW_PHP_STREAMS, SPCFG(wrapper).php_stream_allowlist); | ||
| 391 | 394 | ||
| 392 | #undef ADD_ASSOC_SPLIST | 395 | #undef ADD_ASSOC_SPLIST |
| 393 | 396 | ||
