Merge PR #679: Log proper RPC method name for the initial setup

pull/684/head
jenkins 2024-10-01 16:53:52 +02:00
commit 795e541e01
1 changed files with 1 additions and 1 deletions

View File

@ -621,7 +621,7 @@ void JsonRPCServerImplementation::processJsonPacket(TransportInterface *interfac
// if there is no user in the system yet, let's fail unless this is a special method for authentication itself
if (NymeaCore::instance()->userManager()->initRequired()) {
if (!authExemptMethodsNoUser.contains(methodString) && (token.isEmpty() || !NymeaCore::instance()->userManager()->verifyToken(token))) {
sendUnauthorizedResponse(interface, clientId, commandId, "Initial setup required. Call Users.CreateUser first.");
sendUnauthorizedResponse(interface, clientId, commandId, "Initial setup required. Call JSONRPC.CreateUser first.");
qCWarning(dcJsonRpc()) << "Initial setup required but client does not call the setup. Dropping connection.";
interface->terminateClientConnection(clientId);
qCWarning(dcJsonRpc()) << "Staring connection lockdown timer";