summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <corvus@gnu.org>2009-07-27 21:45:20 -0700
committerJames E. Blair <corvus@gnu.org>2009-07-27 21:45:20 -0700
commitc831b5cd80edefc0520e970e9a52a128c45fd8c7 (patch)
tree9575f2211b9e69c445ad07b0b1482765d30784c6
parent2352d654a798b81236c9d24cde115b51d9fd9c09 (diff)
Return 404 on invalid post id.
-rw-r--r--quoins/controllers.py1
1 files changed, 1 insertions, 0 deletions
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:
478 @expose(template="genshi:quoinstemplates.post") 478 @expose(template="genshi:quoinstemplates.post")
479 def post(self, id): 479 def post(self, id):
480 post = DBSession.query(Post).get(id) 480 post = DBSession.query(Post).get(id)
481 if not post: abort(404)
481 pylons.response.headers['X-Pingback']=self.absolute_url('/pingback/') 482 pylons.response.headers['X-Pingback']=self.absolute_url('/pingback/')
482 return dict(quoins = self, 483 return dict(quoins = self,
483 blog = post.blog, 484 blog = post.blog,