[Bug]: OC\Archive\TAR only partially extracts tar.gz file
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- PHP
- Estrellas
- 36.9k
- Forks
- 5.2k
- Merge medio
- 2 d 3 h
- PR fusionados (30 d)
- 713
Descripción
⚠️ 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
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en 3rdparty/pear/archive_tar/Archive/Tar.php alrededor de la línea 1790 y reproduce el fallo con el archivo stable-diffusion-xl-base-1.0 enlazado usando TAR::extract(). Comprueba por qué la extracción se detiene después de crear solo algunas carpetas y corrige los desplazamientos de cadena no inicializados indicados; se considera terminado cuando todas las carpetas del archivo se extraen sin esas advertencias.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php
- Área
- backend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100