JSON-RPC: sendChatText / broadcastChatMessage / setServerName accept unbounded strings
维护者通常 5 天内回复
@ann0see 已经在做这个了。
开始于 2026年9月14日。
评估
这个 Issue 还没有评估数据。
描述
Describe the bug
jamulusclient/sendChatText, jamulusserver/broadcastChatMessage and jamulusserver/setServerName validate only that their string parameter is a string — no length bound — unlike the sibling chat methods, which reject input above MAX_LEN_CHAT_TEXT (1600):
jamulusserver/privateChatMessage— rejects> MAX_LEN_CHAT_TEXT(src/serverrpc.cpp:125).jamulusserver/setWelcomeMessage— rejects> MAX_LEN_CHAT_TEXT(src/serverrpc.cpp:325).
Normal clients cannot produce such input: the GUI chat dialog truncates input at MAX_LEN_CHAT_TEXT (src/chatdlg.cpp:111). So these three methods deviate from both the peer RPC methods and the GUI path.
Reachable impact on current main
Since #3861 the JSON-RPC transport caps each request line at 16 KiB (MAX_JSON_RPC_REQUEST_BYTES, src/rpcserver.cpp:116), so the message is transport-bounded. It still exceeds the receive-side limits: EvaluateChatTextMes reads at most MAX_LEN_CHAT_TEXT_PLUS_HTML (1800) chars (src/protocol.cpp:1424) and split reassembly caps at 36 parts, while the sender fragments via CreateAndSendMessage with ceil(len / 550) parts and no part-count cap (src/protocol.cpp:590). Result: a ~16 KiB broadcastChatMessage produces a ~27-datagram split burst per connected client that is then silently discarded by every peer. Not memory-unsafe; low severity, but the handlers do not enforce the parameter contract their siblings and the GUI do. An oversized setServerName similarly carries into server-list registration messages to directories and clients.
To Reproduce
- Run a server:
jamulus -s --nogui --jsonrpcport 22150 --jsonrpcsecretfile <secret>(secret >= 16 chars), connect one client. - Call
jamulusserver/broadcastChatMessagewithchatMessageof 10,000 chars. Handler returns ok; peers receive the fragmented message and drop it (receiver bound 1800). - Call it with 20,000 chars: transport rejects with
Parse error: Request exceeds maximum size of 16384 bytes.
Measured against 3.12.5dev (292506eb): 15,000-char broadcast accepted with a +416 KB server RSS delta and ~27 split parts per client; 20,000-char rejected by the 16 KiB boundary.
Expected behavior
sendChatText, broadcastChatMessage (and setServerName) reject input above MAX_LEN_CHAT_TEXT with iErrInvalidParams, mirroring privateChatMessage / setWelcomeMessage.
Version of Jamulus
3.12.5dev (292506eb), JSON-RPC enabled.
Additional context
Formalizes the "String parameters are bounded inconsistently" item of #3916. #3861 bounds the transport; this issue is the remaining handler-level gap.
🤖 Used AI: big-pickle, opencode
- 主要语言
- C
- 星标
- 1.1k
- 派生
- 248
- 平均合并
- 7 天 4 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jamulussoftware/jamulus 的其他 Issue
-
Move translation checker (and potentially other runners) to ARM runner可能已有人在做 @ann0see 于 22 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
jamulussoftware/jamulus#3953 · 2 条评论 ·
维护者通常 5 天内回复
-
Reused channel slot records the previous occupant's audio可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭AI bug
难度 2/5 1-3 小时 新手友好度 82/100
jamulussoftware/jamulus#3901 · 4 条评论 · 1 个 reaction ·
维护者通常 5 天内回复
-
AI
难度 2/5 1-3 小时 新手友好度 78/100
jamulussoftware/jamulus#3846 ·
维护者通常 5 天内回复
-
feature request
难度 5/5 一周以上 新手友好度 25/100
jamulussoftware/jamulus#3964 · 3 条评论 ·
维护者通常 5 天内回复
-
难度 3/5 1-2 天 新手友好度 65/100
jamulussoftware/jamulus#3961 ·
维护者通常 5 天内回复
查看 jamulussoftware/jamulus 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
EchoTools/nevr-runtime#171 · 1 条评论 ·
维护者通常 1 天内回复
-
[P2] Workspace updates silently ignore forbidden assignments while staging the row可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 70/100
维护者通常 4 天内回复
-
category:port-update
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/vcpkg#54338 · 1 条评论 ·
维护者通常 2 天内回复
-
area:http-gateway good first issue priority:low type:docs
难度 2/5 1-3 小时 新手友好度 88/100
crazy-goat/php-fpm-ng#828 ·
维护者通常 1 天内回复