Enable MMG inbound blocking

This commit is contained in:
venusbb
2017-12-19 15:00:51 +00:00
parent 4e548b2203
commit a35b04f5e7
2 changed files with 2 additions and 3 deletions

View File

@@ -34,11 +34,11 @@ def receive_mmg_sms():
if not auth:
current_app.logger.warning("Inbound sms (MMG) no auth header")
# abort(401)
abort(401)
elif auth.username not in current_app.config['MMG_INBOUND_SMS_USERNAME'] \
or auth.password not in current_app.config['MMG_INBOUND_SMS_AUTH']:
current_app.logger.warning("Inbound sms (MMG) incorrect username ({}) or password".format(auth.username))
# abort(403)
abort(403)
inbound_number = strip_leading_forty_four(post_data['Number'])