JSON-RPC: sendChatText / broadcastChatMessage / setServerName accept unbounded strings
Maintainer thường phản hồi trong vòng 5 ngày
@ann0see đang làm issue này rồi.
Từ ngày 14/9/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- C
- Star
- 1.1k
- Fork
- 248
- Merge trung bình
- 7 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jamulussoftware/jamulus
-
Move translation checker (and potentially other runners) to ARM runnerCó thể đã có người làm @ann0see đã nhận 23 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jamulussoftware/jamulus#3953 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Reused channel slot records the previous occupant's audioCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởAI bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jamulussoftware/jamulus#3901 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 5 ngày
-
AI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jamulussoftware/jamulus#3846 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Qt6 moving towards cmakeĐang mởfeature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
jamulussoftware/jamulus#3964 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
jamulussoftware/jamulus#3961 ·
Maintainer thường phản hồi trong vòng 5 ngày
Tất cả issue của jamulussoftware/jamulus
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openwrt/firmware-utils#82 ·
-
area:http-gateway good first issue priority:low type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
crazy-goat/php-fpm-ng#870 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Discover carries headerEdges that nothing reads since #1914 moved E0507/E0517 to the compiler graphĐang mởtech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
2个显示的问题Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
coolsnowwolf/lede#14209 ·
-
Cannot run pico-hsm-tool.pyĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
polhenarejos/pico-hsm#147 ·