From e7f541396715ee2895abcf73044b91ae9b746201 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Wed, 20 Dec 2017 18:09:53 +0100 Subject: Better parsing of the rules Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.--- src/sp_config.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/sp_config.h') diff --git a/src/sp_config.h b/src/sp_config.h index 8ef62a2..127c557 100644 --- a/src/sp_config.h +++ b/src/sp_config.h @@ -78,7 +78,7 @@ typedef struct { char *hash; int simulation; - char *param; + sp_tree *param; pcre *r_param; sp_php_type param_type; int pos; @@ -91,6 +91,9 @@ typedef struct { pcre *value_r; char *value; + pcre *r_key; + char *key; + char *dump; char *alias; bool param_is_array; @@ -100,7 +103,7 @@ typedef struct { bool allow; - char *var; + sp_tree *var; sp_cidr *cidr; } sp_disabled_function; @@ -193,6 +196,8 @@ typedef struct { #define SP_TOKEN_RET_TYPE ".ret_type(" #define SP_TOKEN_VALUE ".value(" #define SP_TOKEN_VALUE_REGEXP ".value_r(" +#define SP_TOKEN_KEY ".key(" +#define SP_TOKEN_KEY_REGEXP ".key_r(" #define SP_TOKEN_VALUE_ARG_POS ".pos(" #define SP_TOKEN_LINE_NUMBER ".line(" -- cgit v1.3