Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

fix(extensions): manifest id is not validated and is used as a path with recursive delete (path traversal)

Offen
#1,560 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
dart, flutter
Bereich
desktop, security

Rechercherichtung

Read lib/core/extensions/models/extension_manifest.dart and the install paths in lib/core/extensions/local_extension_installer.dart; then inspect HttpMarketplaceRepository.install and uninstall for the corresponding path checks. Add the manifest ID validation and containment checks described in the issue, including the listed invalid IDs. Done means both installer paths reject traversal and the unit tests cover those IDs.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug core marketplace P1 stability

Problem

ExtensionManifest.fromJson reads the id as json['id'] as String with no validation (lib/core/extensions/models/extension_manifest.dart:114). The id is then used as a path segment:

  • LocalExtensionInstaller.installFromArchive: Directory(p.join(root.path, manifest.id)), and if it exists, extDir.delete(recursive: true) (lib/core/extensions/local_extension_installer.dart:123-128).
  • HttpMarketplaceRepository.install and uninstall(extensionId): p.join(dir.path, manifest.id) / p.join(dir.path, extensionId), delete(recursive: true) in uninstall.

A sideloaded .qext with "id": "../../some/dir" makes the installer recursively delete a directory outside the extensions folder (and write the extracted files there). isArchiveEntryNameSafe only checks entry names inside the archive, not the manifest id.

Expected

  • Validate the id in ExtensionManifest.fromJson (e.g. ^[A-Za-z0-9][A-Za-z0-9._-]*$, no separators, no ..) and reject the manifest otherwise.
  • After p.join, check isArchiveExtractPathWithinRoot(root, extDir.path) before delete / create, in both installers and in uninstall.
  • Unit tests: ids ../x, a/b, ..\x, absolute path, empty.
Vorherrschende Sprache
Dart
Sterne
23
Forks
1
Ø Merge
31 Min.
Gemergte PRs (30 T.)
570

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus QueryaHub/Querya-Desktop

Alle Issues in QueryaHub/Querya-Desktop

Ähnliche Issues

Weitere Issues zu Dart

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.