From d81b13e158ab55f593c17961d8dd14d8f80f9cf0 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 19baad6d66..e38b0cd5ec 100644 --- a/judge/views/user.py +++ b/judge/views/user.py @@ -81,7 +81,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