restreamer: Disallow very long waveform images

These can take a LOT of server resources (RAM, IO), so we'd rather just fail out
on very long edits where the resulting image would be useless anyway.
pull/256/head
Mike Lang 3 years ago
parent f798b689a4
commit ac44298299

@ -334,6 +334,9 @@ def generate_waveform(channel, quality):
if end <= start:
return "End must be after start", 400
if end - start > datetime.timedelta(hours=6):
return "Range may not be longer than 6 hours", 400
size = request.args.get('size', '1024x64')
try:
width, height = map(int, size.split('x'))

Loading…
Cancel
Save