Change MMG username to look at env variable

This commit is contained in:
venusbb
2017-12-15 12:19:58 +00:00
parent 2e6c46c163
commit ab66f5c0ac
5 changed files with 23 additions and 3 deletions

View File

@@ -35,7 +35,8 @@ def receive_mmg_sms():
if not auth:
current_app.logger.warning("Inbound sms (MMG) no auth header")
# abort(401)
elif auth.username != 'mmg_co_2017' or auth.password not in current_app.config['MMG_INBOUND_SMS_AUTH']:
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)