From de850db5484264bce700bd0bfb72c3f6e3b045c1 Mon Sep 17 00:00:00 2001 From: evgeny Date: Sun, 20 Sep 2026 22:23:42 +0300 Subject: [PATCH] chat: remove join_password check from per-channel JOIN_INFO_REQ (server-link only) --- src/chat/chat_sync.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/chat/chat_sync.c b/src/chat/chat_sync.c index 7a7a3307..a8985c74 100644 --- a/src/chat/chat_sync.c +++ b/src/chat/chat_sync.c @@ -1009,28 +1009,7 @@ static void cs_handle_join_info_req(struct chat_sync* cs, uint64_t peer, return; } - /* 2. пароль (если настроен на сервере) */ - char req_password[128] = ""; - if (len >= 10) { - uint8_t plen2 = pl[9]; - if (plen2 > 0 && plen2 <= len - 10) { - if (plen2 > 127) plen2 = 127; - memcpy(req_password, pl + 10, plen2); req_password[plen2] = '\0'; - } - } - { - struct global_config *gcfg = &cs->inst->config->global; - if (gcfg->chatserver_enabled && gcfg->chatserver_join_password[0]) { - if (strcmp(req_password, gcfg->chatserver_join_password) != 0) { - DEBUG_WARN(DEBUG_CATEGORY_MEMBER_SYNC, "%s: JOIN_INFO_REQ wrong password ch=%s from=%016llx", CS_ID, ch_id, (unsigned long long)peer); - uint8_t err[2] = { CS_MSG_ERROR, 0x01 }; - cs_send(cs, ch_id, peer, err, 2); - return; - } - } - } - - /* 3. инфо канала */ + /* 2. инфо канала */ char name[128]; uint64_t owner; uint8_t ch_x25519[32], ch_ed[32], ch_sig[64]; if (topo_node_sqlite_channel_get(cs->inst->topo_sqlite_db, ch_id, name, (int)sizeof(name), &owner, ch_x25519, ch_ed, ch_sig) != 0) {