Combine checks
This commit is contained in:
parent
d9973c3f29
commit
21115979c4
1 changed files with 2 additions and 5 deletions
|
@ -71,13 +71,10 @@ def clean_input():
|
||||||
Make sure we're not getting bad data from the front end,
|
Make sure we're not getting bad data from the front end,
|
||||||
format data to be machine readable
|
format data to be machine readable
|
||||||
"""
|
"""
|
||||||
if 'password' not in request.form:
|
if empty(request.form.get('password', '')):
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
if not len(request.form['password']) > 0:
|
if empty(request.form.get('ttl', '')):
|
||||||
abort(400)
|
|
||||||
|
|
||||||
if 'ttl' not in request.form:
|
|
||||||
abort(400)
|
abort(400)
|
||||||
|
|
||||||
time_period = request.form['ttl'].lower()
|
time_period = request.form['ttl'].lower()
|
||||||
|
|
Loading…
Reference in a new issue