As long we pass values by reference this is needed. Ugly!

This commit is contained in:
Stefan Esser 2004-06-26 08:09:28 +00:00
parent ff716cbd3e
commit 59d55efb17

View File

@ -212,9 +212,11 @@ SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
*val++ = '\0';
php_url_decode(var, strlen(var));
val_len = php_url_decode(val, strlen(val));
val = estrndup(val, val_len);
if (sapi_module.input_filter(PARSE_POST, var, &val, val_len, &new_val_len TSRMLS_CC)) {
php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC);
}
efree(val);
}
var = php_strtok_r(NULL, "&", &strtok_buf);
}
@ -310,9 +312,11 @@ SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data)
*val++ = '\0';
php_url_decode(var, strlen(var));
val_len = php_url_decode(val, strlen(val));
val = estrndup(val, val_len);
if (sapi_module.input_filter(PARSE_POST, var, &val, val_len, &new_val_len TSRMLS_CC)) {
php_register_variable_safe(var, val, new_val_len, array_ptr TSRMLS_CC);
}
efree(val);
} else {
php_url_decode(var, strlen(var));
php_register_variable_safe(var, "", 0, array_ptr TSRMLS_CC);