Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plugins/daemon/core/service/rpc/handlerpcservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool HandleRpcService::handleRemoteLogin(co::Json &info)
JobManager::instance()->confirmTransfer(lo.appName.c_str());
}
}
bool statu = true;//Comshare::instance()->checkTransCanConnect();
bool statu = Comshare::instance()->checkTransCanConnect();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 High · Rejected logins still connect

When authentication succeeds while checkTransCanConnect() returns false, handleRemoteLogin rejects the RPC login but passes authOK alone to handleRpcLogin; that handler creates a sender, updates connection state, and reports success to the local frontend, so the caller sees a successful connection for a rejected login.

Use authOK && statu as the admission result passed to handleRpcLogin and use it to prevent rejected logins from establishing connection state.

Prompt for AI agents
In `src/plugins/daemon/core/service/rpc/handlerpcservice.cpp` at line 141:

**Rejected logins still connect**

When authentication succeeds while `checkTransCanConnect()` returns false, `handleRemoteLogin` rejects the RPC login but passes `authOK` alone to `handleRpcLogin`; that handler creates a sender, updates connection state, and reports success to the local frontend, so the caller sees a successful connection for a rejected login.

Use `authOK && statu` as the admission result passed to `handleRpcLogin` and use it to prevent rejected logins from establishing connection state.

if (!authOK || !statu) {
lores.result = false;
lores.token = authOK ? "connect file status error!" : "Invalid auth code";
Expand Down
Loading