From cfe6db9cd86d897526fa55bdb14bfe157419ec09 Mon Sep 17 00:00:00 2001 From: Jonathan Neugebauer Date: Thu, 8 Oct 2020 15:22:12 +0200 Subject: [PATCH] Update sms.py --- setup.py | 2 +- sms_gateway/controllers/sms.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5b5e2f2..d53f39f 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def readme(): "Operating System :: POSIX :: Linux", ], python_requires=' >= 3.5', - version='0.1.8', + version='0.1.9', license='MIT', install_requires=[ "falcon >= 2.0.0", diff --git a/sms_gateway/controllers/sms.py b/sms_gateway/controllers/sms.py index 5d9d000..c4aa8b9 100644 --- a/sms_gateway/controllers/sms.py +++ b/sms_gateway/controllers/sms.py @@ -37,7 +37,7 @@ def on_post(self, req, resp): # Check whitelist pattern = re.compile(config.WHITELIST) - if pattern.match(number): + if not pattern.match(number): raise falcon.HTTPBadRequest( 'Number not allowed', f"The number '{number}' is not allowed. Check your whitelist configuration."