From a8ab6484c1cf08bb5669b2f46f933845cc81f077 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 23 Oct 2017 22:47:46 +0200 Subject: Implement the .line filter Close #48 --- src/sp_disabled_functions.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sp_disabled_functions.c') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 54a1906..f089c25 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -172,6 +172,12 @@ bool should_disable(zend_execute_data* execute_data) { } } + if (config_node->line) { + if (config_node->line != zend_get_executed_lineno()) { + goto next; + } + } + if (client_ip && config_node->cidr && (false == cidr_match(client_ip, config_node->cidr))) { goto next; -- cgit v1.3