summaryrefslogtreecommitdiff
path: root/src/sp_config.h
diff options
context:
space:
mode:
authorjvoisin2017-12-27 15:43:33 +0100
committerjvoisin2017-12-27 15:43:33 +0100
commit4fafa8ae5a7bcd700f368bbe6016e0b0fb2cc892 (patch)
tree12438ccccb237e3507fb5bd08c43901d7d0bf904 /src/sp_config.h
parent60888daa7fb433ca15157256980f8baeb8b698a0 (diff)
Implement simulation mode for cookies (de/en)cryption
This should close #102 This commit can be useful for two use-cases: 1. When deploying Snuffleupagus on big CMS like Magento, and not knowing what cookies are modified via javascript. 2. When deploying Snuffleupagus on big websites: you don't want to disconnect every single user at once. When simulation is enabled, if the decryption fails, a log message is now issued, and the cookie value taken as it (since odds are that it's non-encrypted).
Diffstat (limited to 'src/sp_config.h')
-rw-r--r--src/sp_config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sp_config.h b/src/sp_config.h
index 86513f9..3a7a79c 100644
--- a/src/sp_config.h
+++ b/src/sp_config.h
@@ -58,6 +58,7 @@ 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} sp_cookie; 62} sp_cookie;
62 63
63typedef struct { 64typedef struct {