java-debug plugin download not validated — truncated jar silently disables debugging

Đang mở
#324 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java, rust
Lĩnh vực
devtools

Hướng nghiên cứu

The download and install logic for the java-debug plugin jar lives in the Rust extension code of this repository, so start by locating where the debugger jar is fetched and where its presence is checked. Add a size or checksum comparison against the release asset and re-download on mismatch, and confirm the error path surfaces a bundle-load failure. Done means a truncated jar is detected and replaced on the next start, which can be checked by truncating the file manually and restarting.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

The com.microsoft.java.debug.plugin jar is downloaded without any integrity check. A truncated file is accepted as a valid install and silently breaks all debugging.

What happened

  • Extension version: 6.8.30 (WSL remote, Zed 1.26.2)
  • The downloaded debugger/com.microsoft.java.debug.plugin-0.53.2.jar was 668,580 bytes instead of the real 3,107,682 bytes (download interrupted back in April; no validation, so the fragment was kept)
  • On every jdtls start, bundle loading fails (visible in jdtls ~/.cache/jdtls-*/.metadata/.log):
    Cannot extract bundle symbolicName or version .../com.microsoft.java.debug.plugin-0.53.2.jar
    
  • Consequently all debug delegate commands are unregistered: any debug session reports
    No delegateCommandHandler for vscode.java.resolveMainClass
  • This state persisted for months because nothing surfaces the load failure

Fix suggestion: validate the download (size against the release / checksum) and re-download on mismatch, or at least surface bundle-load failures to the user.

Workaround that fixed it locally: re-download the jar from https://github.com/zed-industries/java-debug/releases/download/0.53.2/com.microsoft.java.debug.plugin-0.53.2.jar and fully restart Zed.

Ngôn ngữ chính
Rust
Star
225
Fork
47
Merge trung bình
3 giờ 51 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của zed-extensions/java

Tất cả issue của zed-extensions/java

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.