Prevented one form of DoS attack by limiting number of tags in query to 6.
[wolnelektury.git] / apps / catalogue / templatetags / catalogue_tags.py
index 537e3ec..90cbec3 100644 (file)
@@ -132,7 +132,7 @@ def authentication_form():
 def breadcrumbs(tags, search_form=True):
     from catalogue.forms import SearchForm
     context = {'tag_list': tags}
-    if search_form:
+    if search_form and len(tags) < 6:
         context['search_form'] = SearchForm(tags=tags)
     return context