mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix the arg_separator behaviour. Only & or ; is allowed as separators so no need to use the ini setting here.
This commit is contained in:
parent
e080bd20e8
commit
8c97f5c04d
1 changed files with 2 additions and 13 deletions
|
@ -277,13 +277,7 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
|
|||
return;
|
||||
}
|
||||
|
||||
if (arg == PARSE_COOKIE) {
|
||||
var = php_strtok_r(res, ";", &strtok_buf);
|
||||
} else if (arg == PARSE_POST) {
|
||||
var = php_strtok_r(res, "&", &strtok_buf);
|
||||
} else {
|
||||
var = php_strtok_r(res, PG(arg_separator), &strtok_buf);
|
||||
}
|
||||
var = php_strtok_r(res, ";&", &strtok_buf);
|
||||
|
||||
while (var) {
|
||||
val = strchr(var, '=');
|
||||
|
@ -295,11 +289,7 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
|
|||
val_len = php_url_decode(val, strlen(val));
|
||||
php_register_variable_safe(var, val, val_len, array_ptr ELS_CC PLS_CC);
|
||||
}
|
||||
if (arg == PARSE_COOKIE) {
|
||||
var = php_strtok_r(NULL, ";", &strtok_buf);
|
||||
} else {
|
||||
var = php_strtok_r(NULL, PG(arg_separator), &strtok_buf);
|
||||
}
|
||||
var = php_strtok_r(NULL, ";&", &strtok_buf);
|
||||
}
|
||||
if (free_buffer) {
|
||||
efree(res);
|
||||
|
@ -307,7 +297,6 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
|
|||
}
|
||||
|
||||
|
||||
|
||||
void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC)
|
||||
{
|
||||
char **env, *p, *t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue