diff options
Diffstat (limited to 'post_handler.c')
| -rw-r--r-- | post_handler.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/post_handler.c b/post_handler.c index 1a2374c..3b8ca47 100644 --- a/post_handler.c +++ b/post_handler.c | |||
| @@ -17,9 +17,6 @@ | |||
| 17 | | Ben Fuhrmannek <ben.fuhrmannek@sektioneins.de> | | 17 | | Ben Fuhrmannek <ben.fuhrmannek@sektioneins.de> | |
| 18 | +----------------------------------------------------------------------+ | 18 | +----------------------------------------------------------------------+ |
| 19 | */ | 19 | */ |
| 20 | /* | ||
| 21 | $Id: post_handler.c,v 1.1.1.1 2007-11-28 01:15:35 sesser Exp $ | ||
| 22 | */ | ||
| 23 | 20 | ||
| 24 | #ifdef HAVE_CONFIG_H | 21 | #ifdef HAVE_CONFIG_H |
| 25 | #include "config.h" | 22 | #include "config.h" |
| @@ -49,7 +46,7 @@ static void suhosin_post_handler_modification(sapi_post_entry *spe) | |||
| 49 | } | 46 | } |
| 50 | 47 | ||
| 51 | // static PHP_INI_MH((*old_OnUpdate_mbstring_encoding_translation)) = NULL; | 48 | // static PHP_INI_MH((*old_OnUpdate_mbstring_encoding_translation)) = NULL; |
| 52 | // | 49 | // |
| 53 | // /* {{{ static PHP_INI_MH(suhosin_OnUpdate_mbstring_encoding_translation) */ | 50 | // /* {{{ static PHP_INI_MH(suhosin_OnUpdate_mbstring_encoding_translation) */ |
| 54 | // static PHP_INI_MH(suhosin_OnUpdate_mbstring_encoding_translation) | 51 | // static PHP_INI_MH(suhosin_OnUpdate_mbstring_encoding_translation) |
| 55 | // { | 52 | // { |
| @@ -58,12 +55,12 @@ static void suhosin_post_handler_modification(sapi_post_entry *spe) | |||
| 58 | // char *base = (char *) mh_arg2; | 55 | // char *base = (char *) mh_arg2; |
| 59 | // #else | 56 | // #else |
| 60 | // char *base; | 57 | // char *base; |
| 61 | // | 58 | // |
| 62 | // base = (char *) ts_resource(*((int *) mh_arg2)); | 59 | // base = (char *) ts_resource(*((int *) mh_arg2)); |
| 63 | // #endif | 60 | // #endif |
| 64 | // | 61 | // |
| 65 | // p = (zend_bool *) (base+(size_t) mh_arg1); | 62 | // p = (zend_bool *) (base+(size_t) mh_arg1); |
| 66 | // | 63 | // |
| 67 | // if (new_value_length == 2 && strcasecmp("on", new_value) == 0) { | 64 | // if (new_value_length == 2 && strcasecmp("on", new_value) == 0) { |
| 68 | // *p = (zend_bool) 1; | 65 | // *p = (zend_bool) 1; |
| 69 | // } | 66 | // } |
| @@ -96,7 +93,7 @@ void suhosin_hook_post_handlers() | |||
| 96 | { | 93 | { |
| 97 | HashTable tempht; | 94 | HashTable tempht; |
| 98 | // zend_ini_entry *ini_entry; | 95 | // zend_ini_entry *ini_entry; |
| 99 | 96 | ||
| 100 | sapi_unregister_post_entry(&suhosin_post_entries[0]); | 97 | sapi_unregister_post_entry(&suhosin_post_entries[0]); |
| 101 | // sapi_unregister_post_entry(&suhosin_post_entries[1]); | 98 | // sapi_unregister_post_entry(&suhosin_post_entries[1]); |
| 102 | sapi_register_post_entries(suhosin_post_entries); | 99 | sapi_register_post_entries(suhosin_post_entries); |
| @@ -109,7 +106,7 @@ void suhosin_hook_post_handlers() | |||
| 109 | // zend_hash_destroy(&tempht); | 106 | // zend_hash_destroy(&tempht); |
| 110 | /* And now we can overwrite the destructor for post entries */ | 107 | /* And now we can overwrite the destructor for post entries */ |
| 111 | // SG(known_post_content_types).pDestructor = (dtor_func_t)suhosin_post_handler_modification; | 108 | // SG(known_post_content_types).pDestructor = (dtor_func_t)suhosin_post_handler_modification; |
| 112 | 109 | ||
| 113 | /* we have to stop mbstring from replacing our post handler */ | 110 | /* we have to stop mbstring from replacing our post handler */ |
| 114 | // if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { | 111 | // if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { |
| 115 | // return; | 112 | // return; |
| @@ -122,10 +119,10 @@ void suhosin_hook_post_handlers() | |||
| 122 | // void suhosin_unhook_post_handlers() | 119 | // void suhosin_unhook_post_handlers() |
| 123 | // { | 120 | // { |
| 124 | // zend_ini_entry *ini_entry; | 121 | // zend_ini_entry *ini_entry; |
| 125 | // | 122 | // |
| 126 | // /* Restore to an empty destructor */ | 123 | // /* Restore to an empty destructor */ |
| 127 | // SG(known_post_content_types).pDestructor = NULL; | 124 | // SG(known_post_content_types).pDestructor = NULL; |
| 128 | // | 125 | // |
| 129 | // /* Now restore the ini entry handler */ | 126 | // /* Now restore the ini entry handler */ |
| 130 | // if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { | 127 | // if (zend_hash_find(EG(ini_directives), "mbstring.encoding_translation", sizeof("mbstring.encoding_translation"), (void **) &ini_entry) == FAILURE) { |
| 131 | // return; | 128 | // return; |
