[Bug]: OC\Archive\TAR only partially extracts tar.gz file
Nessuno ha ancora preso questa issue.
- Lingua principale
- PHP
- Stelle
- 36.9k
- Fork
- 5.2k
- Merge medio
- 2g 3h
- PR unite (30g)
- 713
Descrizione
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
File is available here: https://download.nextcloud.com/server/apps/text2image_stablediffusion/stable-diffusion-xl-base-1.0/
Steps to reproduce
$tarManager = new TAR($archivePath);
$tarManager->extract($__DIR__ );
Result:
ls apps/text2image_stablediffusion/models/stable-diffusion-xl
unet vae_decoder vae_encoder
Expected behavior
Should extract all folders
Installation method
Community Manual installation with Archive
Nextcloud Server version
master
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
None
Database engine version
SQlite
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 2 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 3 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 4 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 5 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 6 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 7 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 8 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 9 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 10 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
{"reqId":"gziLpSYLVdLw0IMx6nQD","level":3,"time":"2024-01-09T11:00:45+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Uninitialized string offset 11 at /home/marcel/code/server/3rdparty/pear/archive_tar/Archive/Tar.php#1790","userAgent":"--","version":"29.0.0.3","data":{"app":"PHP"}}
Additional info
No response
Guida per i contributori
Apri la guida per i contributori
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.
Direzione di ricerca
Inizia da 3rdparty/pear/archive_tar/Archive/Tar.php intorno alla riga 1790 e riproduci il problema con l’archivio stable-diffusion-xl-base-1.0 collegato usando TAR::extract(). Verifica perché l’estrazione si interrompe dopo aver creato solo alcune cartelle e correggi gli offset di stringa non inizializzati segnalati; il lavoro è completo quando tutte le cartelle dell’archivio vengono estratte senza questi avvisi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100