diff options
| author | jvoisin | 2018-01-04 15:59:59 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-04 15:59:59 +0100 |
| commit | 3b113be573cdbca20ce9ec9c0a6efb25ccf51db5 (patch) | |
| tree | 5fabbd1da7cd740f26354ffbd2234eba71ffdead /src/sp_config.h | |
| parent | 84e423300c440e96c34ada2620e0f78f827592e8 (diff) | |
Eval blacklist
Add support for eval filtering, only blacklist for now
Diffstat (limited to 'src/sp_config.h')
| -rw-r--r-- | src/sp_config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sp_config.h b/src/sp_config.h index 2417cf9..a4a4f10 100644 --- a/src/sp_config.h +++ b/src/sp_config.h | |||
| @@ -112,6 +112,12 @@ typedef struct { | |||
| 112 | } sp_disabled_function; | 112 | } sp_disabled_function; |
| 113 | 113 | ||
| 114 | typedef struct { | 114 | typedef struct { |
| 115 | sp_list_node *blacklist; | ||
| 116 | sp_list_node *whitelist; | ||
| 117 | bool simulation; | ||
| 118 | } sp_config_eval; | ||
| 119 | |||
| 120 | typedef struct { | ||
| 115 | sp_list_node *disabled_functions; // list of sp_disabled_function | 121 | sp_list_node *disabled_functions; // list of sp_disabled_function |
| 116 | } sp_config_disabled_functions; | 122 | } sp_config_disabled_functions; |
| 117 | 123 | ||
| @@ -145,6 +151,7 @@ typedef struct { | |||
| 145 | sp_config_global_strict *config_global_strict; | 151 | sp_config_global_strict *config_global_strict; |
| 146 | sp_config_disable_xxe *config_disable_xxe; | 152 | sp_config_disable_xxe *config_disable_xxe; |
| 147 | sp_config_disabled_constructs *config_disabled_constructs; | 153 | sp_config_disabled_constructs *config_disabled_constructs; |
| 154 | sp_config_eval *config_eval; | ||
| 148 | } sp_config; | 155 | } sp_config; |
| 149 | 156 | ||
| 150 | typedef struct { | 157 | typedef struct { |
| @@ -170,6 +177,7 @@ typedef struct { | |||
| 170 | #define SP_TOKEN_UNSERIALIZE_HMAC ".unserialize_hmac" | 177 | #define SP_TOKEN_UNSERIALIZE_HMAC ".unserialize_hmac" |
| 171 | #define SP_TOKEN_UPLOAD_VALIDATION ".upload_validation" | 178 | #define SP_TOKEN_UPLOAD_VALIDATION ".upload_validation" |
| 172 | #define SP_TOKEN_DISABLE_XXE ".disable_xxe" | 179 | #define SP_TOKEN_DISABLE_XXE ".disable_xxe" |
| 180 | #define SP_TOKEN_EVAL ".eval_filter" | ||
| 173 | 181 | ||
| 174 | // common tokens | 182 | // common tokens |
| 175 | #define SP_TOKEN_ENABLE ".enable(" | 183 | #define SP_TOKEN_ENABLE ".enable(" |
| @@ -222,6 +230,10 @@ typedef struct { | |||
| 222 | // upload_validator | 230 | // upload_validator |
| 223 | #define SP_TOKEN_UPLOAD_SCRIPT ".script(" | 231 | #define SP_TOKEN_UPLOAD_SCRIPT ".script(" |
| 224 | 232 | ||
| 233 | // eval blacklist | ||
| 234 | #define SP_TOKEN_EVAL_BLACKLIST ".blacklist(" | ||
| 235 | #define SP_TOKEN_EVAL_WHITELIST ".whitelist(" | ||
| 236 | |||
| 225 | int sp_parse_config(const char *); | 237 | int sp_parse_config(const char *); |
| 226 | int parse_array(sp_disabled_function *); | 238 | int parse_array(sp_disabled_function *); |
| 227 | 239 | ||
