mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Added abort 400 in case of recipients param being missing.
This commit is contained in:
@@ -11,7 +11,8 @@ from flask import (
|
|||||||
url_for,
|
url_for,
|
||||||
session,
|
session,
|
||||||
flash,
|
flash,
|
||||||
current_app
|
current_app,
|
||||||
|
abort
|
||||||
)
|
)
|
||||||
|
|
||||||
from flask_login import login_required
|
from flask_login import login_required
|
||||||
@@ -75,6 +76,8 @@ def sendsms(service_id):
|
|||||||
def checksms(service_id):
|
def checksms(service_id):
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
filename = request.args.get('recipients')
|
filename = request.args.get('recipients')
|
||||||
|
if not filename:
|
||||||
|
abort(400)
|
||||||
filepath = os.path.join(current_app.config['UPLOAD_FOLDER'],
|
filepath = os.path.join(current_app.config['UPLOAD_FOLDER'],
|
||||||
filename)
|
filename)
|
||||||
upload_result = _build_upload_result(filepath)
|
upload_result = _build_upload_result(filepath)
|
||||||
|
|||||||
Reference in New Issue
Block a user