From 153ba4baa7156aae73bc32c09c6a2ded41f6458d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sun, 7 May 2023 09:48:19 +0200 Subject: [PATCH] Disallow large lookup batches --- acoustid/api/v2/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/acoustid/api/v2/__init__.py b/acoustid/api/v2/__init__.py index f32b5490..11edd201 100644 --- a/acoustid/api/v2/__init__.py +++ b/acoustid/api/v2/__init__.py @@ -646,6 +646,9 @@ def _handle_internal(self, params): assert params.max_duration_diff is not None + if len(params.fingerprints) > 10: + raise errors.RequestTooLargeError() + if params.batch: fingerprints = params.fingerprints else: