From 085e0944970710e458e199bb04188e2cddbf17f3 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 8 Jul 2013 15:42:55 +1000 Subject: [PATCH] 404 if a category does not exist .... --- app/controllers/list_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb index 635d6a1dd15..69048ea828c 100644 --- a/app/controllers/list_controller.rb +++ b/app/controllers/list_controller.rb @@ -35,6 +35,10 @@ class ListController < ApplicationController if request_is_for_uncategorized? list = query.list_uncategorized else + if !@category + raise Discourse::NotFound + return + end guardian.ensure_can_see!(@category) list = query.list_category(@category) end