diff options
| author | jvoisin | 2020-07-04 17:56:03 +0200 |
|---|---|---|
| committer | jvoisin | 2020-07-04 17:56:03 +0200 |
| commit | 08f21d8b878b6c1490e6d6bb3d44aa640a88e9ca (patch) | |
| tree | 0b4b55a5c8d24d05408bf02bd244e78c130ba87d /src/sp_disabled_functions.c | |
| parent | 6c7ad0c1dfcf324828be4153b86a808b35995820 (diff) | |
Factorize how snuffleupagus gets client's ip addr
Diffstat (limited to '')
| -rw-r--r-- | src/sp_disabled_functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 4807955..a6fc194 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -327,7 +327,7 @@ static void should_disable(zend_execute_data* execute_data, | |||
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | if (config_node->cidr) { | 329 | if (config_node->cidr) { |
| 330 | char* client_ip = getenv("REMOTE_ADDR"); | 330 | const char* client_ip = get_ipaddr(); |
| 331 | if (client_ip && false == cidr_match(client_ip, config_node->cidr)) { | 331 | if (client_ip && false == cidr_match(client_ip, config_node->cidr)) { |
| 332 | goto next; | 332 | goto next; |
| 333 | } | 333 | } |
