[Zope-CVS] SVN: soap/trunk/publisher.py make sure Unauthorized is
handled in all cases; some usages could leak through
Fred L. Drake, Jr.
fdrake at gmail.com
Mon Apr 18 16:51:52 EDT 2005
Log message for revision 30032:
make sure Unauthorized is handled in all cases; some usages could leak through
Changed:
U soap/trunk/publisher.py
-=-
Modified: soap/trunk/publisher.py
===================================================================
--- soap/trunk/publisher.py 2005-04-18 20:32:54 UTC (rev 30031)
+++ soap/trunk/publisher.py 2005-04-18 20:51:52 UTC (rev 30032)
@@ -24,6 +24,7 @@
from ZSI import TC, ParsedSoap, ParseException
from ZSI import SoapWriter, Fault
from zope.security.proxy import isinstance
+from zope.security.interfaces import IUnauthorized
from zope.publisher.xmlrpc import premarshal
from zope.interface import implements
from StringIO import StringIO
@@ -172,6 +173,11 @@
def handleException(self, exc_info):
"""Handle exceptions that occur during processing."""
type, value = exc_info[:2]
+ if IUnauthorized.providedBy(value):
+ self.setStatus(401)
+ self._body = ""
+ self._updateContentLength()
+ return
if not isinstance(value, Fault):
value = ZSI.FaultFromException(value, 0)
self.setStatus(500)
More information about the Zope-CVS
mailing list