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

Aperta
#324 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
java, rust
Ambito
devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
225
Fork
47
Merge medio
3h 51m
PR unite (30g)
7

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di zed-extensions/java

Tutte le issue di zed-extensions/java

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.