[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPResponse.py:1.48.24.2

Shane Hathaway shane@digicool.com
Thu, 18 Oct 2001 11:57:34 -0400


Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv21923

Modified Files:
      Tag: cAccessControl-review-branch
	HTTPResponse.py 
Log Message:
Made sure Unauthorized errors use the correct HTTP response code.  The
security suite caught this one, yay!


=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.48.24.1 => 1.48.24.2 ===
         else: t,v,tb = sys.exc_info()
 
-        if t=='Unauthorized' or (
-            type(t) is not types.StringType and issubclass(t, Unauthorized)
+        if t=='Unauthorized' or t == Unauthorized or (
+            isinstance(t, types.ClassType) and issubclass(t, Unauthorized)
             ):
+            t = 'Unauthorized'
             self._unauthorized()
 
         stb=tb