projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
CURLINFO_TLS_SESSION
[m6w6/ext-http]
/
php_http_params.c
diff --git
a/php_http_params.c
b/php_http_params.c
index 4b02e8c925874345f5b369478e69e0d6382fe0b3..65504ac660155e6d40da74c98d8e7b0d4b15b7cc 100644
(file)
--- a/
php_http_params.c
+++ b/
php_http_params.c
@@
-60,7
+60,7
@@
static inline void sanitize_escaped(zval *zv TSRMLS_DC)
ZVAL_STRINGL(zv, deq, deq_len, 0);
}
ZVAL_STRINGL(zv, deq, deq_len, 0);
}
- php_strip
slashes(Z_STRVAL_P(zv), &Z_STRLEN_P(zv) TSRMLS_CC
);
+ php_strip
cslashes(Z_STRVAL_P(zv), &Z_STRLEN_P(zv)
);
}
static inline void prepare_escaped(zval *zv TSRMLS_DC)
}
static inline void prepare_escaped(zval *zv TSRMLS_DC)
@@
-68,9
+68,10
@@
static inline void prepare_escaped(zval *zv TSRMLS_DC)
if (Z_TYPE_P(zv) == IS_STRING) {
int len = Z_STRLEN_P(zv);
if (Z_TYPE_P(zv) == IS_STRING) {
int len = Z_STRLEN_P(zv);
- Z_STRVAL_P(zv) = php_addslashes(Z_STRVAL_P(zv), Z_STRLEN_P(zv), &Z_STRLEN_P(zv), 1 TSRMLS_CC);
+ Z_STRVAL_P(zv) = php_addcslashes(Z_STRVAL_P(zv), Z_STRLEN_P(zv), &Z_STRLEN_P(zv), 1,
+ ZEND_STRL("\0..\37\173\\\"") TSRMLS_CC);
- if (len != Z_STRLEN_P(zv)) {
+ if (len != Z_STRLEN_P(zv)
|| strpbrk(Z_STRVAL_P(zv), "()<>@,;:\"[]?={} ")
) {
zval tmp = *zv;
int len = Z_STRLEN_P(zv) + 2;
char *str = emalloc(len + 1);
zval tmp = *zv;
int len = Z_STRLEN_P(zv) + 2;
char *str = emalloc(len + 1);
@@
-569,7
+570,7
@@
static void push_param(HashTable *params, php_http_params_state_t *state, const
}
static inline zend_bool check_str(const char *chk_str, size_t chk_len, const char *sep_str, size_t sep_len) {
}
static inline zend_bool check_str(const char *chk_str, size_t chk_len, const char *sep_str, size_t sep_len) {
- return 0 < sep_len && chk_len >= sep_len &&
!memcmp(chk_str, sep_str, sep_len
);
+ return 0 < sep_len && chk_len >= sep_len &&
*chk_str == *sep_str && !memcmp(chk_str + 1, sep_str + 1, sep_len - 1
);
}
static size_t check_sep(php_http_params_state_t *state, php_http_params_token_t **separators)
}
static size_t check_sep(php_http_params_state_t *state, php_http_params_token_t **separators)