Ignore:
Timestamp:
16/10/07 14:17:29 (12 years ago)
Author:
pjkersha
Message:

ows_server/ows_server/controllers/login.py: fix to exception handling for invalid SSL cert in LoginController?.doRedirect - added InvalidCertDN type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/login.py

    r2934 r2955  
    1414    AttributeRequestDenied 
    1515from ndg.security.common.m2CryptoSSLUtility import HTTPSConnection, \ 
    16     HostCheck, InvalidCertSignature 
     16    HostCheck, InvalidCertSignature, InvalidCertDN 
    1717 
    1818 
     
    222222                try: 
    223223                    testConnection.connect() 
    224                 except InvalidCertSignature, e: 
    225                     log.error("Login: requestor SSL cert.: %s" % e) 
    226                     c.xml = "There is a problem with the SSL certificate of"+\ 
    227                             " the site requesting your login details. " + \ 
    228                             " Please report this to your site administrator." 
     224                except (InvalidCertSignature, InvalidCertDN), e: 
     225                    log.error("Login: requestor SSL certificate: %s" % e) 
     226                    c.xml = """Request to redirect back to %s with your  
     227credentials refused: there is a problem with the SSL certificate of this site. 
     228  Please report this to your site administrator.""" % returnToHostname 
    229229                    return Response(render('login'), code=400) 
    230230            finally:     
Note: See TracChangeset for help on using the changeset viewer.