summaryrefslogtreecommitdiff
path: root/post_handler.c
diff options
context:
space:
mode:
authorBen Fuhrmannek2015-01-15 17:09:32 +0100
committerBen Fuhrmannek2015-01-15 17:09:32 +0100
commit5335470004c0e97fd5f4d4a2d0371693cb26fccc (patch)
treeb058967648f7069b5f43a1c23a7c7b8f56460959 /post_handler.c
parent68960966324f4701a1f402e97f17ca7870a317a4 (diff)
removed <5.4 compatibility code
Diffstat (limited to 'post_handler.c')
-rw-r--r--post_handler.c11
1 files changed, 1 insertions, 10 deletions
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)
46{ 46{
47 char *var, *val, *e, *s, *p; 47 char *var, *val, *e, *s, *p;
48 zval *array_ptr = (zval *) arg; 48 zval *array_ptr = (zval *) arg;
49#if 1 //PHP_VERSION_ID >= 50311
50 long count = 0; 49 long count = 0;
51#endif 50
52 if (SG(request_info).post_data == NULL) { 51 if (SG(request_info).post_data == NULL) {
53 return; 52 return;
54 } 53 }
@@ -61,12 +60,10 @@ last_value:
61 if ((val = memchr(s, '=', (p - s)))) { /* have a value */ 60 if ((val = memchr(s, '=', (p - s)))) { /* have a value */
62 unsigned int val_len, new_val_len; 61 unsigned int val_len, new_val_len;
63 62
64#if 1 //PHP_VERSION_ID >= 50311
65 if (++count > PG(max_input_vars)) { 63 if (++count > PG(max_input_vars)) {
66 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)); 64 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));
67 return; 65 return;
68 } 66 }
69#endif
70 var = s; 67 var = s;
71 68
72 php_url_decode(var, (val - s)); 69 php_url_decode(var, (val - s));
@@ -266,15 +263,9 @@ void suhosin_hook_post_handlers(TSRMLS_D)
266 HashTable tempht; 263 HashTable tempht;
267 zend_ini_entry *ini_entry; 264 zend_ini_entry *ini_entry;
268 265
269#if 1 //PHP_MAJOR_VERSION > 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION > 0)
270 sapi_unregister_post_entry(&suhosin_post_entries[0] TSRMLS_CC); 266 sapi_unregister_post_entry(&suhosin_post_entries[0] TSRMLS_CC);
271 sapi_unregister_post_entry(&suhosin_post_entries[1] TSRMLS_CC); 267 sapi_unregister_post_entry(&suhosin_post_entries[1] TSRMLS_CC);
272 sapi_register_post_entries(suhosin_post_entries TSRMLS_CC); 268 sapi_register_post_entries(suhosin_post_entries TSRMLS_CC);
273#else
274 sapi_unregister_post_entry(&suhosin_post_entries[0]);
275 sapi_unregister_post_entry(&suhosin_post_entries[1]);
276 sapi_register_post_entries(suhosin_post_entries);
277#endif
278 269
279 /* we want to get notified if another extension deregisters the suhosin post handlers */ 270 /* we want to get notified if another extension deregisters the suhosin post handlers */
280 271