Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Filepaths get incorrectly decoded leading to files being extracted in the wrong directory

Ouverte
#77 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
68/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
python
Domaine
backend

Piste de recherche

Start by extracting the attached minimal archive after repackaging it as a .tar.xz on Debian 13, then trace how Extractcode decodes archive member paths and handles the +dfsg/LICENSES/Qt- segment. Compare the resulting path with the expected qt6-webengine-6.8.2+dfsg/LICENSES/Qt-GPL-exception-1.0.txt. Done means extraction preserves the directory structure and filename for this example.

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

Description

We are using Extractcode to extract large open source archives.
We have found a case where after extraction files some files from subdirectories are extracted into the extraction root and given very long and partially gibberish names.

This happened specifically upon extracting qt6-webengine 6.8.2+dfsg-4 (http://deb.debian.org/debian/pool/main/q/qt6-webengine/qt6-webengine_6.8.2+dfsg-4.debian.tar.xz).

After extraction the file qt6-webengine-6.8.2+dfsg/LICENSES/Qt-GPL-exception-1.0.txt was found in the extraction root with filename qt6-webengine-6.8.2Min _nyopeQu _ GPL-exception-1.0.txt

After some investigation we found that +dfsg/LICENSES/Qt- is being incorrectly decoded as UTF-7, leading to a full-path of qt6-webengine-6.8.2痻\u20fc눂ე葋\uf42dGPL-exception-1.0.txt which is the transliterated to qt6-webengine-6.8.2Min _nyopeQu _ GPL-exception-1.0.txt This means that the directory structure of the file is entirely lost and the file gets extracted to the extraction root instead of the correct directory.
The same happens for a selection of other files in the archive, but not reliably for every file. We were not able to determine what specifically triggers the issue, our assumption is that it has to do with Kanji encoding in some form (e.g. if the final part of a path can theoretically be decoded as a Kanji it incorrectly assumes it is UTF-7 encoded).

We have attached a minimal example of this (note: we had to package it as a .zip due to file support limitations on github, for testing it should be extracted and then reachived as a .tar.xz) with only this Qt-GPL-exception-1.0.txt file contained for easier verification and testing.
qt6-webengine-6.8.2+dfsg.zip

We were able to reproduce the issue reliably on a Debian 13 system, the issue was not reproducible on a Windows 11 machine.

Langage dominant
Python
Étoiles
39
Forks
23
Métriques de merge des PR
Aucune PR mergée en 30 j

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 aboutcode-org/extractcode

Toutes les issues de aboutcode-org/extractcode

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

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