Changed get logs to hanndle ints correctly (#4460)

This commit is contained in:
tomjshore 2020-12-04 10:47:09 +00:00 committed by GitHub
parent 8d9c84236d
commit 8e662a5179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -601,7 +601,7 @@ def scan_log_limited(taskid, start, end):
logger.warning("[%s] Invalid task ID provided to scan_log_limited()" % taskid)
return jsonize({"success": False, "message": "Invalid task ID"})
if not start.isdigit() or not end.isdigit() or end < start:
if not start.isdigit() or not end.isdigit() or int(end) < int(start):
logger.warning("[%s] Invalid start or end value provided to scan_log_limited()" % taskid)
return jsonize({"success": False, "message": "Invalid start or end value, must be digits"})