diff options
| author | Ben Fuhrmannek | 2021-12-14 14:29:43 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2021-12-14 14:29:43 +0100 |
| commit | 4a45ba42b609d48c8297456d67cc8d955073b567 (patch) | |
| tree | 947bd03955cd9e8c141f133ab12d3a84bd62611e /src/sp_utils.h | |
| parent | 1746eb1013af60d8524a42fb3431446a5933a646 (diff) | |
fix: include class name in eval whitelist matching
Diffstat (limited to 'src/sp_utils.h')
| -rw-r--r-- | src/sp_utils.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sp_utils.h b/src/sp_utils.h index a4694f2..0581363 100644 --- a/src/sp_utils.h +++ b/src/sp_utils.h | |||
| @@ -85,8 +85,10 @@ void sp_log_disable_ret(const char *restrict, const zend_string *restrict, | |||
| 85 | bool hook_function(const char *, HashTable *, zif_handler); | 85 | bool hook_function(const char *, HashTable *, zif_handler); |
| 86 | void unhook_functions(HashTable *ht); | 86 | void unhook_functions(HashTable *ht); |
| 87 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); | 87 | int hook_regexp(const sp_pcre *, HashTable *, zif_handler); |
| 88 | bool check_is_in_eval_whitelist(const zend_string *const function_name); | 88 | bool check_is_in_eval_whitelist(const char* function_name); |
| 89 | int sp_log_request(const zend_string *restrict folder, const zend_string *restrict text_repr); | 89 | int sp_log_request(const zend_string *restrict folder, const zend_string *restrict text_repr); |
| 90 | bool sp_zend_string_equals(const zend_string *s1, const zend_string *s2); | 90 | #define sp_zend_string_equals(s1, s2) zend_string_equals((zend_string*)s1, (zend_string*)s2) |
| 91 | 91 | static inline bool sp_zend_string_equals_str(const zend_string* s1, const char *str, size_t len) { | |
| 92 | return (ZSTR_LEN(s1) == len && !memcmp(ZSTR_VAL(s1), str, len)); | ||
| 93 | } | ||
| 92 | #endif /* SP_UTILS_H */ | 94 | #endif /* SP_UTILS_H */ |
