X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/062c5ec3437a944e39b486d36a54a6a11fa332d1..aa275ffefc86d3b642eb309f977f570866e002df:/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: