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

Ouverte
#324 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
java, rust
Domaine
devtools

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
225
Forks
47
Merge moyen
3 h 51 min
PR mergées (30 j)
7

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de zed-extensions/java

Toutes les issues de zed-extensions/java

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.