From c831b5cd80edefc0520e970e9a52a128c45fd8c7 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 27 Jul 2009 21:45:20 -0700 Subject: Return 404 on invalid post id. --- quoins/controllers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/quoins/controllers.py b/quoins/controllers.py index 089ada2..d22cd51 100644 --- a/quoins/controllers.py +++ b/quoins/controllers.py @@ -478,6 +478,7 @@ Comment: @expose(template="genshi:quoinstemplates.post") def post(self, id): post = DBSession.query(Post).get(id) + if not post: abort(404) pylons.response.headers['X-Pingback']=self.absolute_url('/pingback/') return dict(quoins = self, blog = post.blog, -- cgit v1.2.3