diff --git a/web/server/codechecker_server/api/authentication.py b/web/server/codechecker_server/api/authentication.py index 0d9d7993df..8d2dfe983d 100644 --- a/web/server/codechecker_server/api/authentication.py +++ b/web/server/codechecker_server/api/authentication.py @@ -288,8 +288,8 @@ def performLogin(self, auth_method, auth_string): LOG.error("User %s is not authorized " + "to access this service.", username) raise codechecker_api_shared.ttypes.RequestFailed( - codechecker_api_shared.ttypes.ErrorCode.AUTH_DENIED, - "User is not authorized to access this service") + codechecker_api_shared.ttypes.ErrorCode.AUTH_DENIED, + "User is not authorized to access this service") LOG.error("Could not negotiate via common authentication method.") raise codechecker_api_shared.ttypes.RequestFailed( codechecker_api_shared.ttypes.ErrorCode.AUTH_DENIED, diff --git a/web/tests/functional/authentication/test_authentication.py b/web/tests/functional/authentication/test_authentication.py index 4af8068cd9..60718d02a0 100644 --- a/web/tests/functional/authentication/test_authentication.py +++ b/web/tests/functional/authentication/test_authentication.py @@ -67,6 +67,7 @@ def test_privileged_access(self): with self.assertRaises(RequestFailed): auth_client.performLogin("Username:Password", None) + print("Empty credentials gave us a token!") # A non-authenticated session should return an empty user. user = auth_client.getLoggedInUser()