From 449bc8d8d0118f6753ab6a06c7c7e0ba90b8cccd Mon Sep 17 00:00:00 2001 From: venusbb Date: Thu, 14 Sep 2017 13:53:08 +0100 Subject: [PATCH 1/2] fixing minor problem, logged ip variable name changed --- app/authentication/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/authentication/auth.py b/app/authentication/auth.py index d24153bcd..d4841c4cf 100644 --- a/app/authentication/auth.py +++ b/app/authentication/auth.py @@ -80,7 +80,7 @@ def restrict_ip_sms(): 'message': 'Inbound sms ip address', 'log_contents': { 'passed': allowed, - 'ip_address': ip + 'ip_address': inbound_ip } }) return From db977be8d005b069ed1b0b0cd7ed7ba1ac87293d Mon Sep 17 00:00:00 2001 From: venusbb Date: Fri, 15 Sep 2017 10:54:25 +0100 Subject: [PATCH 2/2] delete old variable ip --- app/authentication/auth.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/authentication/auth.py b/app/authentication/auth.py index d4841c4cf..2d7788279 100644 --- a/app/authentication/auth.py +++ b/app/authentication/auth.py @@ -51,7 +51,6 @@ def restrict_ip_sms(): current_app.logger.info("X-Custom-forwarder {}".format(request.headers.get("X-Custom-forwarder"))) # Check IP of SMS providers - ip = '' if request.headers.get("X-Forwarded-For"): # X-Forwarded-For looks like "203.0.113.195, 70.41.3.18, 150.172.238.178" # Counting backwards and look at the IP at the 3rd last hop - hence, hop(end-3)