• Joined on 2026-04-07
dailz closed issue dailz/wl-webrtc#12 2026-06-06 21:23:40 +08:00
安全: HTTP 500 响应回显异常详情,信息泄露 (webrtc.rs:213)
dailz commented on issue dailz/wl-webrtc#12 2026-06-06 21:23:33 +08:00
安全: HTTP 500 响应回显异常详情,信息泄露 (webrtc.rs:213)

已修复,commit 8b04893。

变更: src/webrtc.rs:213 — HTTP 500 响应体不再包含原始错误信息,改为返回通用空响应体。

修复前: let resp = format!("HTTP/1.1 500 Error\r\nConnection: close\r\n\r\n{e}"…

dailz pushed to master at dailz/wl-webrtc 2026-06-06 21:23:07 +08:00
8b04893ceb fix(security): remove error details from HTTP 500 response (#12)
1beaea8088 fix(webrtc): use MediaAdded event to discover video mid instead of hardcoded iteration (closes #11)
fc4733ffe8 fix: return Ok(true) on ICE Disconnected to prevent resource leak
Compare 3 commits »
dailz closed issue dailz/wl-webrtc#11 2026-06-06 21:17:44 +08:00
改进: discover_video_params 硬编码 mid 值遍历 (webrtc.rs:314)
dailz commented on issue dailz/wl-webrtc#11 2026-06-06 21:17:37 +08:00
改进: discover_video_params 硬编码 mid 值遍历 (webrtc.rs:314)

修复方案

根因: discover_video_params 硬编码遍历 ["0","1","2","3"] 来查找 video media,但 str0m 的 Mid 是 SDP 协商决定的字符串标识符(如 "aud""video"),不是数字索引。若实际 mid…

dailz closed issue dailz/wl-webrtc#10 2026-06-06 20:58:16 +08:00
Bug: poll_rtc 始终返回 Ok(false),断连后资源永久泄漏 (webrtc.rs)
dailz commented on issue dailz/wl-webrtc#10 2026-06-06 20:57:53 +08:00
Bug: poll_rtc 始终返回 Ok(false),断连后资源永久泄漏 (webrtc.rs)

修复信息

提交: fc4733f

改动: src/webrtc.rs L360 — 在 IceConnectionState::Disconnected 分支添加 return Ok(true);

原理: WebRtcInner::poll_rtc() 始终返回 Ok(false),导致上层…

dailz commented on issue dailz/wl-webrtc#9 2026-06-06 20:20:45 +08:00
改进: state_portal.rs 中 expect 应改为 bail! (state_portal.rs:165)

修复方案

将 state_portal.rs 中两处 expect() 替换为 ok_or_else(..)? 错误传播,与函数返回类型 Result 及已有的 bail! 用法保持一致。

变更内容

**1. webrtc_paused 解包(原第 167…

dailz closed issue dailz/wl-webrtc#9 2026-06-06 20:20:00 +08:00
改进: state_portal.rs 中 expect 应改为 bail! (state_portal.rs:165)
dailz pushed to master at dailz/wl-webrtc 2026-06-06 20:20:00 +08:00
d5679be3a4 fix(state_portal): replace expect() with bail-style error propagation (closes #9)
36f07c92e9 fix(state_portal): prevent shutdown deadlock on full bounded channel (closes #8)
Compare 2 commits »
dailz closed issue dailz/wl-webrtc#8 2026-06-06 20:03:34 +08:00
Bug: shutdown() 中 tx.send() 阻塞导致潜在死锁 (state_portal.rs)
dailz commented on issue dailz/wl-webrtc#8 2026-06-06 20:03:27 +08:00
Bug: shutdown() 中 tx.send() 阻塞导致潜在死锁 (state_portal.rs)

修复方案 (commit 36f07c9)

Bug 已确认并修复,双重防护:

根因分析

shutdown()enc.flush()drain_encoder()tx.send() 在满的 bounded(32) 通道上阻塞。由于 webrtc_rx

dailz commented on issue dailz/wl-webrtc#7 2026-06-06 15:56:03 +08:00
unsafe: flush() 中缺少 SAFETY 注释 (avhw.rs:757)

修复完成

Issue 原指 flush() 中第 766 行缺少 SAFETY 注释,实际审核发现文件中共有 19 处 unsafe 缺少文档。

修复内容

1. 补全 SAFETY 注释(19 处)

  • 17 个 unsafe block
  • 2 个 unsafe…
dailz closed issue dailz/wl-webrtc#7 2026-06-06 15:54:18 +08:00
unsafe: flush() 中缺少 SAFETY 注释 (avhw.rs:757)
dailz pushed to master at dailz/wl-webrtc 2026-06-06 15:54:18 +08:00
7c1c9b2e19 fix(avhw): add SAFETY comments to all undocumented unsafe blocks
dailz commented on issue dailz/wl-webrtc#6 2026-06-06 15:14:40 +08:00
Bug: tx.send() 失败被静默忽略,编码器继续无效工作 (avhw.rs)

修复方案

第一层:channel 断开检测(SendError)

drain_encoder() 中将 let _ = tx.send(data.to_vec()) 替换为:

if let Err(e) = tx.send(data.to_vec()) {
    tracing::warn!("WebRTC…
dailz pushed to master at dailz/wl-webrtc 2026-06-06 15:12:56 +08:00
226768c3e3 fix(avhw): handle tx.send() failure and pause encoding on WebRTC disconnect (closes #6)
fd170b66d9 fix(unsafe): add SAFETY comment and runtime guards for from_raw_parts in drain_encoder
Compare 2 commits »
dailz closed issue dailz/wl-webrtc#6 2026-06-06 15:12:56 +08:00
Bug: tx.send() 失败被静默忽略,编码器继续无效工作 (avhw.rs)
dailz closed issue dailz/wl-webrtc#5 2026-06-06 11:58:29 +08:00
unsafe: drain_encoder 中使用 from_raw_parts 应添加 SAFETY 注释 (avhw.rs)