summaryrefslogtreecommitdiff
path: root/src/sp_utils.h
diff options
context:
space:
mode:
authorBen Fuhrmannek2021-12-14 14:29:43 +0100
committerBen Fuhrmannek2021-12-14 14:29:43 +0100
commit4a45ba42b609d48c8297456d67cc8d955073b567 (patch)
tree947bd03955cd9e8c141f133ab12d3a84bd62611e /src/sp_utils.h
parent1746eb1013af60d8524a42fb3431446a5933a646 (diff)
fix: include class name in eval whitelist matching
Diffstat (limited to 'src/sp_utils.h')
-rw-r--r--src/sp_utils.h8
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,
85bool hook_function(const char *, HashTable *, zif_handler); 85bool hook_function(const char *, HashTable *, zif_handler);
86void unhook_functions(HashTable *ht); 86void unhook_functions(HashTable *ht);
87int hook_regexp(const sp_pcre *, HashTable *, zif_handler); 87int hook_regexp(const sp_pcre *, HashTable *, zif_handler);
88bool check_is_in_eval_whitelist(const zend_string *const function_name); 88bool check_is_in_eval_whitelist(const char* function_name);
89int sp_log_request(const zend_string *restrict folder, const zend_string *restrict text_repr); 89int sp_log_request(const zend_string *restrict folder, const zend_string *restrict text_repr);
90bool 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 91static 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 */