mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Catch public exceptions when creating the LDAP context in WSGI.
Made specifically for the case where S4U2Proxy delegation fails. https://fedorahosted.org/freeipa/ticket/2414
This commit is contained in:
committed by
Martin Kosek
parent
1c898e388b
commit
b241e828a9
@@ -317,9 +317,15 @@ class xmlserver(WSGIExecutioner):
|
||||
'''
|
||||
|
||||
self.debug('WSGI xmlserver.__call__:')
|
||||
self.create_context(ccache=environ.get('KRB5CCNAME'))
|
||||
try:
|
||||
self.create_context(ccache=environ.get('KRB5CCNAME'))
|
||||
response = super(xmlserver, self).__call__(environ, start_response)
|
||||
except PublicError, e:
|
||||
status = '200 OK'
|
||||
response = status
|
||||
headers = [('Content-Type', 'text/plain')]
|
||||
start_response(status, headers)
|
||||
return self.marshal(None, e)
|
||||
finally:
|
||||
destroy_context()
|
||||
return response
|
||||
|
||||
Reference in New Issue
Block a user