From 5335470004c0e97fd5f4d4a2d0371693cb26fccc Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Thu, 15 Jan 2015 17:09:32 +0100 Subject: removed <5.4 compatibility code --- post_handler.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'post_handler.c') diff --git a/post_handler.c b/post_handler.c index 388a096..ec40387 100644 --- a/post_handler.c +++ b/post_handler.c @@ -46,9 +46,8 @@ SAPI_POST_HANDLER_FUNC(suhosin_std_post_handler) { char *var, *val, *e, *s, *p; zval *array_ptr = (zval *) arg; -#if 1 //PHP_VERSION_ID >= 50311 long count = 0; -#endif + if (SG(request_info).post_data == NULL) { return; } @@ -61,12 +60,10 @@ last_value: if ((val = memchr(s, '=', (p - s)))) { /* have a value */ unsigned int val_len, new_val_len; -#if 1 //PHP_VERSION_ID >= 50311 if (++count > PG(max_input_vars)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.", PG(max_input_vars)); return; } -#endif var = s; php_url_decode(var, (val - s)); @@ -266,15 +263,9 @@ void suhosin_hook_post_handlers(TSRMLS_D) HashTable tempht; zend_ini_entry *ini_entry; -#if 1 //PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0) sapi_unregister_post_entry(&suhosin_post_entries[0] TSRMLS_CC); sapi_unregister_post_entry(&suhosin_post_entries[1] TSRMLS_CC); sapi_register_post_entries(suhosin_post_entries TSRMLS_CC); -#else - sapi_unregister_post_entry(&suhosin_post_entries[0]); - sapi_unregister_post_entry(&suhosin_post_entries[1]); - sapi_register_post_entries(suhosin_post_entries); -#endif /* we want to get notified if another extension deregisters the suhosin post handlers */ -- cgit v1.3