diff options
| author | jvoisin | 2017-12-27 15:43:33 +0100 |
|---|---|---|
| committer | jvoisin | 2017-12-27 15:43:33 +0100 |
| commit | 4fafa8ae5a7bcd700f368bbe6016e0b0fb2cc892 (patch) | |
| tree | 12438ccccb237e3507fb5bd08c43901d7d0bf904 /src/tests/config | |
| parent | 60888daa7fb433ca15157256980f8baeb8b698a0 (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/tests/config')
| -rw-r--r-- | src/tests/config/config_encrypted_cookies_simulation.ini | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tests/config/config_encrypted_cookies_simulation.ini b/src/tests/config/config_encrypted_cookies_simulation.ini new file mode 100644 index 0000000..32e24a1 --- /dev/null +++ b/src/tests/config/config_encrypted_cookies_simulation.ini | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | sp.global.secret_key("abcdef").cookie_env_var("REMOTE_ADDR"); | ||
| 2 | sp.cookie.name("super_cookie").encrypt().simulation(); | ||
| 3 | sp.auto_cookie_secure.enable(); | ||
