Skip to content

fix(dispatch): hub_relay 推送目标改绑定设备 id + MCP URL 真校验 - #2168

Merged
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-25
Sep 1, 2026
Merged

fix(dispatch): hub_relay 推送目标改绑定设备 id + MCP URL 真校验#2168
DeliciousBuding merged 1 commit into
masterfrom
chore/cleanup-round-25

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

范围(安全探索 lane F12/F15)

  • F15 功能 bugdispatchRouteHubRelay 原来把 InviterUserIDPushToDevice 的键——byDevicedevice_id 建键,hub_relay 活推送每次静默 miss,任务只能靠 outbox 重试。改为传 task.EdgeDeviceID(空值保留 inviter 回退);测试记录 target id 并断言 dev-1 + 新增回退用例。
  • F12(P2)MCPServer.Validate 的 URL 校验从子串匹配升级为 url.Parse——强制 http/https、必须有 host、拒绝 userinfo/凭据参数;新增 ftp / 无 host / 裸主机名三用例。

验证

  • go test model / dispatchsvc / handler 三包全绿
  • go vet 绿;git diff --check 干净

安全探索 lane F12/F15 收口:

- F15(功能 bug):dispatchRouteHubRelay 原把 InviterUserID 当 PushToDevice 键——byDevice 以 device_id 建键,hub_relay 活推送每次静默 miss,任务永远靠 outbox 重试。改传 task.EdgeDeviceID(空值保留 inviter 回退),测试记录 target id 并断言 dev-1 + 新增回退用例
- F12(P2):MCPServer.Validate 的 URL 校验从子串匹配升级为 url.Parse——强制 http/https、必须有 host、拒绝 userinfo/凭据参数;新增 ftp/无 host/裸主机名三用例

验证:model/dispatchsvc/handler 三包 go test 全绿;go vet 绿;git diff --check 干净

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c3a6b724-3da4-4e62-8f6f-35fc2a1d69f2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DeliciousBuding
DeliciousBuding merged commit 0b42ad3 into master Sep 1, 2026
38 of 39 checks passed
@DeliciousBuding
DeliciousBuding deleted the chore/cleanup-round-25 branch September 1, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant