Skip to content

Commit a11d2a5

Browse files
mkschulzeclaude
andcommitted
fix(14.1): use anonymous: prefix for prelisten username
NINJAM servers reject passwordless connections without the "anonymous:" username prefix. The normal ConnectCommand handler adds this prefix but the PrelistenCommand handler was missing it, causing immediate auth failure. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 65d4a46 commit a11d2a5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

juce/NinjamRunThread.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,11 @@ void NinjamRunThread::processCommands(NJClient* client)
723723
// Step 5: Build username from processor.lastUsername (NOT client->GetUser())
724724
// Research Gray Area 5: Disconnect() clears m_user to empty string,
725725
// so client->GetUser() would return "" here.
726+
// Must use "anonymous:" prefix for passwordless connections — NINJAM
727+
// servers reject usernames without this prefix when no password is set.
726728
std::string uname = processor.lastUsername.toStdString();
727729
if (uname.empty()) uname = "anonymous";
728-
std::string username = "[preview]" + uname;
730+
std::string username = "anonymous:[preview]" + uname;
729731

730732
// Step 6: Store host/port for Connected event emission in handleStatusChange
731733
prelistenHost_ = c.host;

0 commit comments

Comments
 (0)