Commit 3e69c19f authored by Antoine Millet's avatar Antoine Millet
Browse files

[bug#3939] Fixed bug with authentication with a bad password

parent ea0dd750
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -549,14 +549,14 @@ class WelcomeHandler(CCHandler):
                if 'close' in self._server.conf.show(login)['tags']:
                    raise AuthenticationError('Account is closed')

        if role not in WelcomeHandler.ROLES:
            raise BadRoleError('%r is not a legal role' % role)

        if role is None:
            logging.info('New authentication from %s: failure',
                         login.encode('ascii', 'ignore'))
            raise AuthenticationError('Bad login/password')
        else:
            if role not in WelcomeHandler.ROLES:
                raise BadRoleError('%r is not a legal role' % role)
            
            # If authentication is a success, try to register the client:
            try:
                self._server.register(login, role, conn)