Filepaths get incorrectly decoded leading to files being extracted in the wrong directory
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 39
- Fork
- 23
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aboutcode-org/extractcode
-
Investigate failing testsAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
aboutcode-org/extractcode#75 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
aboutcode-org/extractcode#73 · 4 reazioni ·
-
QA Failure for vmimage extractor (vmimage.py): libguestfs configuration on UbuntuForse già presa @ArkaprabhaChakraborty l’ha presa 642 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
aboutcode-org/extractcode#69 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
aboutcode-org/extractcode#66 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
aboutcode-org/extractcode#65 · 1 commento ·
Tutte le issue di aboutcode-org/extractcode
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
aws-samples/sample-per-model-bedrock#639 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
awslabs/visual-asset-management-system#937 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
project-codeflare/codeflare-sdk#1195 ·
I maintainer di solito rispondono entro 1 giorno
-
Bump numpy dependencyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
pandas-dev/pandas-stubs#2051 ·
I maintainer di solito rispondono entro 1 giorno