From 6f639422838b32cb7fc83efea439b58f9707c4d8 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 15 Sep 2024 22:09:02 -0400 Subject: [PATCH] Return 404 for non-existent users --- judge/views/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/views/user.py b/judge/views/user.py index 437f52568..7a5ef8ea5 100644 --- a/judge/views/user.py +++ b/judge/views/user.py @@ -103,7 +103,7 @@ def dispatch(self, request, *args, **kwargs): return super(UserPage, self).dispatch(request, *args, **kwargs) except Http404: return generic_message(request, _('No such user'), _('No user handle "%s".') % - self.kwargs.get(self.slug_url_kwarg, None)) + self.kwargs.get(self.slug_url_kwarg, None), status=404) def get_title(self): return (_('My account') if self.request.user == self.object.user else