Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#1,560 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, flutter
Área
desktop, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Dart
Estrellas
23
Forks
1
Merge medio
31 min
PR fusionados (30 d)
570

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de QueryaHub/Querya-Desktop

Todos los issues de QueryaHub/Querya-Desktop

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.