summaryrefslogtreecommitdiff
path: root/src/sp_config.h
diff options
context:
space:
mode:
authorThibault "bui" Koechlin2017-12-28 13:37:10 +0100
committerjvoisin2017-12-28 13:37:10 +0100
commitbc4d0e014e9fb1edd05e6f9c91cbf97b6c5546b4 (patch)
treecad37642d9c1e5ef786f29c18a030c4a8a288af2 /src/sp_config.h
parentfe057bba5baaef8fe428b971604194ef9c9119c0 (diff)
Implement regexp support for cookies encryption
It's now possible to encrypt cookies matching a specific regexp. This should close #106
Diffstat (limited to 'src/sp_config.h')
-rw-r--r--src/sp_config.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sp_config.h b/src/sp_config.h
index 3a7a79c..aca9ff6 100644
--- a/src/sp_config.h
+++ b/src/sp_config.h
@@ -58,7 +58,9 @@ typedef struct { bool enable; } sp_config_disable_xxe;
58typedef struct { 58typedef struct {
59 enum samesite_type {strict=1, lax=2} samesite; 59 enum samesite_type {strict=1, lax=2} samesite;
60 bool encrypt; 60 bool encrypt;
61 bool simulation; 61 char *name;
62 pcre *name_r;
63 bool simulation;
62} sp_cookie; 64} sp_cookie;
63 65
64typedef struct { 66typedef struct {
@@ -114,7 +116,7 @@ typedef struct {
114} sp_config_disabled_functions; 116} sp_config_disabled_functions;
115 117
116typedef struct { 118typedef struct {
117 HashTable *cookies; // HashTable of sp_cookie 119 sp_list_node *cookies; //list of sp_cookie for regexp/names
118} sp_config_cookie; 120} sp_config_cookie;
119 121
120typedef struct { 122typedef struct {
@@ -204,6 +206,7 @@ typedef struct {
204 206
205// cookies encryption 207// cookies encryption
206#define SP_TOKEN_NAME ".name(" 208#define SP_TOKEN_NAME ".name("
209#define SP_TOKEN_NAME_REGEXP ".name_r("
207 210
208// cookies samesite 211// cookies samesite
209#define SP_TOKEN_SAMESITE ".samesite(" 212#define SP_TOKEN_SAMESITE ".samesite("