diff options
| author | kkadosh | 2018-05-29 19:34:16 +0000 |
|---|---|---|
| committer | jvoisin | 2018-05-29 19:34:16 +0000 |
| commit | 7832438b7abedf567ce6376f99949f419abcdff1 (patch) | |
| tree | 560e43918d1dc36ce4cf760a5b27aed0c563bc1c /src/snuffleupagus.c | |
| parent | 9eebe8c67e03e3041d454ea28e93996f7a67740b (diff) | |
Support session encryption
Implement session encryption.
Diffstat (limited to 'src/snuffleupagus.c')
| -rw-r--r-- | src/snuffleupagus.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 3cdcfb9..c3fc686 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -81,6 +81,7 @@ PHP_GINIT_FUNCTION(snuffleupagus) { | |||
| 81 | SP_INIT(snuffleupagus_globals->config.config_disabled_functions); | 81 | SP_INIT(snuffleupagus_globals->config.config_disabled_functions); |
| 82 | SP_INIT(snuffleupagus_globals->config.config_disabled_functions_ret); | 82 | SP_INIT(snuffleupagus_globals->config.config_disabled_functions_ret); |
| 83 | SP_INIT(snuffleupagus_globals->config.config_cookie); | 83 | SP_INIT(snuffleupagus_globals->config.config_cookie); |
| 84 | SP_INIT(snuffleupagus_globals->config.config_session); | ||
| 84 | SP_INIT(snuffleupagus_globals->config.config_disabled_constructs); | 85 | SP_INIT(snuffleupagus_globals->config.config_disabled_constructs); |
| 85 | SP_INIT(snuffleupagus_globals->config.config_eval); | 86 | SP_INIT(snuffleupagus_globals->config.config_eval); |
| 86 | 87 | ||
| @@ -124,6 +125,7 @@ PHP_MSHUTDOWN_FUNCTION(snuffleupagus) { | |||
| 124 | pefree(SNUFFLEUPAGUS_G(config.config_snuffleupagus), 1); | 125 | pefree(SNUFFLEUPAGUS_G(config.config_snuffleupagus), 1); |
| 125 | pefree(SNUFFLEUPAGUS_G(config.config_disable_xxe), 1); | 126 | pefree(SNUFFLEUPAGUS_G(config.config_disable_xxe), 1); |
| 126 | pefree(SNUFFLEUPAGUS_G(config.config_upload_validation), 1); | 127 | pefree(SNUFFLEUPAGUS_G(config.config_upload_validation), 1); |
| 128 | pefree(SNUFFLEUPAGUS_G(config.config_session), 1); | ||
| 127 | 129 | ||
| 128 | #define FREE_LST_DISABLE(L) \ | 130 | #define FREE_LST_DISABLE(L) \ |
| 129 | do { \ | 131 | do { \ |
| @@ -229,6 +231,10 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 229 | } | 231 | } |
| 230 | hook_cookies(); | 232 | hook_cookies(); |
| 231 | 233 | ||
| 234 | if (SNUFFLEUPAGUS_G(config).config_session->encrypt) { | ||
| 235 | hook_session(); | ||
| 236 | } | ||
| 237 | |||
| 232 | if (true == SNUFFLEUPAGUS_G(config).config_global_strict->enable) { | 238 | if (true == SNUFFLEUPAGUS_G(config).config_global_strict->enable) { |
| 233 | if (!zend_get_extension(PHP_SNUFFLEUPAGUS_EXTNAME)) { | 239 | if (!zend_get_extension(PHP_SNUFFLEUPAGUS_EXTNAME)) { |
| 234 | zend_extension_entry.startup = NULL; | 240 | zend_extension_entry.startup = NULL; |
