Skip to content

v2.3.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 13:44
· 2 commits to main since this release

Main updates:

New Features

  • Added Android TV version, supporting remote control operation on the TV.
  • Optimize the algorithm of the scanning device to shorten the scanning time to within 1 second.

Security Fixes

  • Fixed Windows path traversal: drive letters, illegal chars, reserved names, and control chars are handled; target path is verified inside the download directory.
  • Added request body limits for JSON endpoints: 64 KB normal, 16 MB batch confirm, 413 when exceeded.
  • Hardened transfer tickets: bound to confirmed filename and size; real source IP used; abandoned batches cleaned after 10 min; duplicate filenames skipped; max 3 concurrent confirmation dialogs, 429 when exceeded.
  • Added SecretKeyVerifier shared by file and clipboard endpoints: constant-time comparison, 5 failures per IP within 1 minute locks for 5 minutes.

Confirmation Dialogs

  • Added ClipboardRequestPrompter, shared by LAN and relay.
  • Timeout closes only its own route; relay clipboard now shows a countdown.
  • Fixed LAN receive timeout message, no longer reports “file size mismatch”.

Cleanup

  • Consolidated duplicate cleanup logic and unified random/hex encoding into HexUtil.
  • Removed dead code and restored 14 garbled Chinese strings in relay_clipboard_service.dart.

Settings

  • TV settings now use TransferController, unifying receive-path validation.
  • TV now confirms before shrinking history limit, matching mobile.

主要更新

新增功能

  • 新增 Android 电视版,支持在电视上使用遥控器操作。
  • 优化扫描设备的算法,扫描耗时缩短到 1 秒内。

安全修复

  • 修复 Windows 路径穿越:处理盘符、非法字符、保留名和控制字符,并校验目标路径在下载目录内。
  • JSON 接口增加请求体上限:普通 64 KB,批量确认 16 MB,超出返回 413。
  • 收紧传输票据:ticket 绑定确认过的文件名和大小;使用真实来源 IP;放弃批次 10 分钟清理;重名文件跳过;并发确认框最多 3 个,超出返回 429。
  • 新增 SecretKeyVerifier,文件和剪贴板共用;常量时间比较,同 IP 1 分钟错 5 次锁 5 分钟。

确认框

  • 新增 ClipboardRequestPrompter,局域网和中转共用对话框实现。
  • 超时只关闭自身路由;中转剪贴板增加倒计时。
  • 修正局域网接收超时提示,不再误报“文件大小不匹配”。

清理

  • 合并重复清理逻辑,统一随机串和十六进制编码为 HexUtil。
  • 删除无效代码,恢复 relay_clipboard_service.dart 中 14 处乱码中文。

设置

  • TV 版设置页改用 TransferController,接收路径校验逻辑统一。
  • TV 版缩小历史上限时也先弹确认框,与手机版一致。