From b4c332190e975af2e21ba8fc6afb1f94492c3573 Mon Sep 17 00:00:00 2001 From: codl Date: Fri, 15 Mar 2019 21:21:56 +0100 Subject: [PATCH] return 404 on empty known instances cookie that way it will use the default --- routes/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api.py b/routes/api.py index 07460c8..4f35f17 100644 --- a/routes/api.py +++ b/routes/api.py @@ -67,7 +67,7 @@ def known_instances(): if request.method == 'GET': known = request.cookies.get('forget_known_instances', '') if not known: - return Response('[]', 200, mimetype='application/json') + return Response('[]', 404, mimetype='application/json') # pad to avoid oracle attacks for _ in range(random.randint(0, 1000)):