X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/062c5ec3437a944e39b486d36a54a6a11fa332d1..88a1cd8bdc3da0baf43aa8c3f4f6095af5282348:/apps/catalogue/views.py diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 052537491..d8a61e35e 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -97,6 +97,10 @@ def book_list(request): def tagged_object_list(request, tags=''): + # Prevent DoS attacks on our database + if len(tags.split('/')) > 6: + raise Http404 + try: tags = models.Tag.get_tag_list(tags) except models.Tag.DoesNotExist: