Skip to content

Commit 66caede

Browse files
author
Richard Jones
committed
merge from HEAD;
1 parent 42aec37 commit 66caede

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Fixed:
1717
- fix permission check on RetireAction (sf bug 1407342)
1818
- timezone now applied to date for pretty-format (sf bug 1406861)
1919
- fix mangling of "_" in mail Subject class name (sf bug 1413852)
20+
- catch bad classname in URL (related to sf bug 1240541)
2021

2122

2223
2005-10-07 0.8.5

roundup/cgi/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.211.2.4 2005-07-18 02:20:13 richard Exp $
1+
# $Id: client.py,v 1.211.2.5 2006-01-25 03:01:51 richard Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -563,7 +563,11 @@ def determine_context(self, dre=re.compile(r'([^\d]+)0*(\d+)')):
563563
if m:
564564
self.classname = m.group(1)
565565
self.nodeid = m.group(2)
566-
if not self.db.getclass(self.classname).hasnode(self.nodeid):
566+
try:
567+
klass = self.db.getclass(self.classname)
568+
except KeyError:
569+
raise NotFound, '%s/%s'%(self.classname, self.nodeid)
570+
if not klass.hasnode(self.nodeid):
567571
raise NotFound, '%s/%s'%(self.classname, self.nodeid)
568572
# with a designator, we default to item view
569573
self.template = 'item'

0 commit comments

Comments
 (0)