Added abort 400 in case of recipients param being missing.

This commit is contained in:
Adam Shimali
2016-01-14 10:26:18 +00:00
parent 2f802e3183
commit a0e5ae59ea

View File

@@ -11,7 +11,8 @@ from flask import (
url_for,
session,
flash,
current_app
current_app,
abort
)
from flask_login import login_required
@@ -75,6 +76,8 @@ def sendsms(service_id):
def checksms(service_id):
if request.method == 'GET':
filename = request.args.get('recipients')
if not filename:
abort(400)
filepath = os.path.join(current_app.config['UPLOAD_FOLDER'],
filename)
upload_result = _build_upload_result(filepath)