summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sha256.c4
-rw-r--r--suhosin.c4
-rw-r--r--treat_data.c11
3 files changed, 1 insertions, 18 deletions
diff --git a/sha256.c b/sha256.c
index 64ee25f..8810f34 100644
--- a/sha256.c
+++ b/sha256.c
@@ -404,11 +404,7 @@ void suhosin_hook_sha256(TSRMLS_D)
404 } 404 }
405 405
406 /* add the sha256 functions */ 406 /* add the sha256 functions */
407#ifndef ZEND_ENGINE_2
408 zend_register_functions(suhosin_sha256_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
409#else
410 zend_register_functions(NULL, suhosin_sha256_functions, NULL, MODULE_PERSISTENT TSRMLS_CC); 407 zend_register_functions(NULL, suhosin_sha256_functions, NULL, MODULE_PERSISTENT TSRMLS_CC);
411#endif
412} 408}
413 409
414 410
diff --git a/suhosin.c b/suhosin.c
index 76cdac1..1dedbd2 100644
--- a/suhosin.c
+++ b/suhosin.c
@@ -994,11 +994,7 @@ PHP_MINIT_FUNCTION(suhosin)
994 994
995 SDEBUG("updating ini %s=%s", i->name, i->value); 995 SDEBUG("updating ini %s=%s", i->name, i->value);
996 996
997#ifdef ZEND_ENGINE_2
998 i->modifiable = p->modifiable; 997 i->modifiable = p->modifiable;
999#else
1000 i->modifyable = p->modifyable;
1001#endif
1002 i->module_number = module_number; 998 i->module_number = module_number;
1003 i->on_modify = p->on_modify; 999 i->on_modify = p->on_modify;
1004 i->mh_arg1 = p->mh_arg1; 1000 i->mh_arg1 = p->mh_arg1;
diff --git a/treat_data.c b/treat_data.c
index 10e8166..aa645be 100644
--- a/treat_data.c
+++ b/treat_data.c
@@ -160,13 +160,9 @@ SAPI_TREAT_DATA_FUNC(suhosin_treat_data)
160 val_len = php_url_decode(val, strlen(val)); 160 val_len = php_url_decode(val, strlen(val));
161 val = estrndup(val, val_len); 161 val = estrndup(val, val_len);
162 if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) { 162 if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) {
163#ifdef ZEND_ENGINE_2
164 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) { 163 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) {
165#endif
166 php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); 164 php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC);
167#ifdef ZEND_ENGINE_2
168 } 165 }
169#endif
170 } else { 166 } else {
171 SUHOSIN_G(abort_request) = 1; 167 SUHOSIN_G(abort_request) = 1;
172 } 168 }
@@ -179,13 +175,9 @@ SAPI_TREAT_DATA_FUNC(suhosin_treat_data)
179 val_len = 0; 175 val_len = 0;
180 val = estrndup("", val_len); 176 val = estrndup("", val_len);
181 if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) { 177 if (suhosin_input_filter(arg, var, &val, val_len, &new_val_len TSRMLS_CC)) {
182#ifdef ZEND_ENGINE_2
183 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) { 178 if (sapi_module.input_filter(arg, var, &val, new_val_len, &new_val_len TSRMLS_CC)) {
184#endif
185 php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC); 179 php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC);
186#ifdef ZEND_ENGINE_2
187 } 180 }
188#endif
189 } else { 181 } else {
190 SUHOSIN_G(abort_request) = 1; 182 SUHOSIN_G(abort_request) = 1;
191 } 183 }
@@ -209,12 +201,11 @@ void suhosin_hook_treat_data()
209 TSRMLS_FETCH(); 201 TSRMLS_FETCH();
210 202
211 sapi_register_treat_data(suhosin_treat_data TSRMLS_CC); 203 sapi_register_treat_data(suhosin_treat_data TSRMLS_CC);
212#ifdef ZEND_ENGINE_2 204
213 if (old_input_filter == NULL) { 205 if (old_input_filter == NULL) {
214 old_input_filter = sapi_module.input_filter; 206 old_input_filter = sapi_module.input_filter;
215 } 207 }
216 sapi_module.input_filter = suhosin_input_filter_wrapper; 208 sapi_module.input_filter = suhosin_input_filter_wrapper;
217#endif
218} 209}
219 210
220 211