diff options
| author | Ben Fuhrmannek | 2016-03-07 23:29:21 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2016-03-07 23:29:21 +0100 |
| commit | a17a53b490bd5127a7ec67063a31b186e6956805 (patch) | |
| tree | f64e5e866940e47b6c054f4bbf9fa342377a7517 /php_suhosin7.h | |
| parent | f2788a5543f72cdbe5fafd95ea7b37fab06745e3 (diff) | |
session support
Diffstat (limited to 'php_suhosin7.h')
| -rw-r--r-- | php_suhosin7.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/php_suhosin7.h b/php_suhosin7.h index cbde402..75244fe 100644 --- a/php_suhosin7.h +++ b/php_suhosin7.h | |||
| @@ -71,6 +71,9 @@ extern zend_module_entry suhosin7_module_entry; | |||
| 71 | // PHP_MINFO_FUNCTION(suhosin); | 71 | // PHP_MINFO_FUNCTION(suhosin); |
| 72 | 72 | ||
| 73 | #include "ext/standard/basic_functions.h" | 73 | #include "ext/standard/basic_functions.h" |
| 74 | #ifdef HAVE_PHP_SESSION | ||
| 75 | #include "ext/session/php_session.h" | ||
| 76 | #endif | ||
| 74 | 77 | ||
| 75 | static inline int suhosin_is_protected_varname(char *var, int var_len) | 78 | static inline int suhosin_is_protected_varname(char *var, int var_len) |
| 76 | { | 79 | { |
| @@ -219,6 +222,15 @@ ZEND_BEGIN_MODULE_GLOBALS(suhosin7) | |||
| 219 | zend_bool no_more_cookie_variables; | 222 | zend_bool no_more_cookie_variables; |
| 220 | zend_bool no_more_uploads; | 223 | zend_bool no_more_uploads; |
| 221 | 224 | ||
| 225 | /* session */ | ||
| 226 | #ifdef HAVE_PHP_SESSION | ||
| 227 | void *s_module; | ||
| 228 | void *s_original_mod; | ||
| 229 | int (*old_s_read)(PS_READ_ARGS); | ||
| 230 | int (*old_s_write)(PS_WRITE_ARGS); | ||
| 231 | int (*old_s_destroy)(PS_DESTROY_ARGS); | ||
| 232 | #endif | ||
| 233 | |||
| 222 | /* encryption */ | 234 | /* encryption */ |
| 223 | BYTE fi[24],ri[24]; | 235 | BYTE fi[24],ri[24]; |
| 224 | WORD fkey[120]; | 236 | WORD fkey[120]; |
| @@ -377,6 +389,9 @@ void suhosin_hook_header_handler(); | |||
| 377 | void suhosin_unhook_header_handler(); | 389 | void suhosin_unhook_header_handler(); |
| 378 | void suhosin_hook_execute(); | 390 | void suhosin_hook_execute(); |
| 379 | // void suhosin_hook_sha256(); | 391 | // void suhosin_hook_sha256(); |
| 392 | #ifdef HAVE_PHP_SESSION | ||
| 393 | void suhosin_hook_session(); | ||
| 394 | #endif | ||
| 380 | 395 | ||
| 381 | // ifilter.c | 396 | // ifilter.c |
| 382 | void suhosin_normalize_varname(char *varname); | 397 | void suhosin_normalize_varname(char *varname); |
| @@ -390,6 +405,7 @@ char *suhosin_decrypt_single_cookie(char *name, int name_len, char *value, int v | |||
| 390 | zend_string *suhosin_encrypt_string(char *str, int len, char *var, int vlen, char *key); | 405 | zend_string *suhosin_encrypt_string(char *str, int len, char *var, int vlen, char *key); |
| 391 | zend_string *suhosin_decrypt_string(char *str, int padded_len, char *var, int vlen, char *key, int check_ra); | 406 | zend_string *suhosin_decrypt_string(char *str, int padded_len, char *var, int vlen, char *key, int check_ra); |
| 392 | char *suhosin_generate_key(char *key, zend_bool ua, zend_bool dr, long raddr, char *cryptkey); | 407 | char *suhosin_generate_key(char *key, zend_bool ua, zend_bool dr, long raddr, char *cryptkey); |
| 408 | #define S7_GENERATE_KEY(type, keyvar) suhosin_generate_key(SUHOSIN7_G(type ## _cryptkey), SUHOSIN7_G(type ## _cryptua), SUHOSIN7_G(type ## _cryptdocroot), SUHOSIN7_G(type ## _cryptraddr), (char *)keyvar); | ||
| 393 | 409 | ||
| 394 | // aes.c | 410 | // aes.c |
| 395 | void suhosin_aes_gentables(); | 411 | void suhosin_aes_gentables(); |
