summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2025-10-07 12:58:57 +0000
committerMagnus Hagander2025-10-07 12:58:57 +0000
commita8b8612324a5ed2e81e1c68ce4c536d3a25300e4 (patch)
treed75e8bb1bb67815ba5232e9638a85491dfee6b2f
parent9ff684602daed2db5d614d7ce9430f64b4a33f3f (diff)
Disallow searches for empty string
This was already blocked in the frontend, but this is something that should be checked in the backend too.
-rw-r--r--postgresqleu/confreg/checkin.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/postgresqleu/confreg/checkin.py b/postgresqleu/confreg/checkin.py
index 84dde1e4..fa70f680 100644
--- a/postgresqleu/confreg/checkin.py
+++ b/postgresqleu/confreg/checkin.py
@@ -314,6 +314,8 @@ def api(request, urlname, regtoken, what):
return _json_response({'reg': _get_reg_json(r)})
elif what == 'search':
s = request.GET.get('search').strip()
+ if not s:
+ raise Http404()
q = Q()
for n in s.split():
# For each part of the given string, search both first and last name