diff options
| author | jvoisin | 2017-10-23 22:47:46 +0200 |
|---|---|---|
| committer | GitHub | 2017-10-23 22:47:46 +0200 |
| commit | a8ab6484c1cf08bb5669b2f46f933845cc81f077 (patch) | |
| tree | 06bcfc62b03c2113277385073294bcb27f30d643 /src/sp_disabled_functions.c | |
| parent | a50fe60a3d736bce1a1838d4e736f80af1ee7bbc (diff) | |
Implement the .line filter
Close #48
Diffstat (limited to 'src/sp_disabled_functions.c')
| -rw-r--r-- | src/sp_disabled_functions.c | 6 |
1 files changed, 6 insertions, 0 deletions
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) { | |||
| 172 | } | 172 | } |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | if (config_node->line) { | ||
| 176 | if (config_node->line != zend_get_executed_lineno()) { | ||
| 177 | goto next; | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 175 | if (client_ip && config_node->cidr && | 181 | if (client_ip && config_node->cidr && |
| 176 | (false == cidr_match(client_ip, config_node->cidr))) { | 182 | (false == cidr_match(client_ip, config_node->cidr))) { |
| 177 | goto next; | 183 | goto next; |
