24c85b8 Handle DatabaseError in RPC-Server connect()

1 file Authored by cheimes 2 years ago, Committed by abbra 2 years ago,
    Handle DatabaseError in RPC-Server connect()
    
    DatabaseError exceptions with 'account inactivated' message are turned
    into 401 Unauthorized errors. The problem occurs when a user is disabled
    but has a valid cookie.
    
    Other DatabaseErrors are turned into 503 Service Unavailable. They
    usually occur when LDAP server is not available or broken.
    
    Fixes: https://pagure.io/freeipa/issue/8352
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
    
        
file modified
+36 -0