ZIP extraction tests do not catch predictable temporary-file reuse
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
Línea de trabajo
El informe identifica tests/test_utils.py y la clase de pruebas TestExtractZippedPaths. Lee los casos de extracción existentes, aplica el cambio de solo pruebas enlazado y ejecuta python -m pytest tests/test_utils.py::TestExtractZippedPaths. La tarea estará terminada cuando pasen los ocho casos y las nuevas pruebas detecten la reutilización previsible de rutas en la revisión anterior a la corrección.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
The existing TestExtractZippedPaths cases pass against the implementation from before the fix for CVE-2026-25645. They do not exercise a pre-existing file at the basename destination or extraction of same-named members from different archives. Current Requests already contains the fix; this report concerns the missing regression coverage.
Expected Result
The extraction tests should catch reuse of a predictable temporary filename. Extracting a ZIP member should return its content without reusing or overwriting an unrelated existing file. Members with the same basename from different archives should retain separate paths and contents.
Actual Result
The six existing extraction cases pass on the pre-fix revision 8b9bc8fc0f63be84602387913c4b689f19efd028.
Two additional tests catch the regression. One creates an unrelated file at the old basename destination; the other extracts same-named members from two archives. Both fail on that pre-fix revision because extraction returns the reused path. All eight cases pass with the original fix, 66d21cb07bd6255b1280291c4fafb71803cdb3b7, and on main at 3c7baaa05ab4aa49cc819ce3a819d260de19c157.
Reproduction Steps
The complete test-only change is in openforge-live/requests@abf2080. It changes only tests/test_utils.py, uses small ZIP files in pytest temporary directories, and leaves production code unchanged.
Apply that commit to main at 3c7baaa, then run:
python -m pytest tests/test_utils.py::TestExtractZippedPaths
The expected result is eight passes. Running the same extraction test class against the pre-fix package produces two failures at the assertions that the returned paths must be distinct. The six existing cases still pass.
The prepared commit is linked here because this account cannot open a pull request under the repository's current collaborators-only PR setting.
System Information
Verified on Linux with Python 3.13.13 and pytest 9.0.3, importing Requests from the source revisions above. The entire current tests/test_utils.py file passes: 218 passed, 13 skipped. The full integration suite, Windows and PyPy were not run.
- Lenguaje dominante
- Python
- Estrellas
- 54.6k
- Forks
- 12.1k
- Merge medio
- 18 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la 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.
Más de psf/requests
-
Docs: link security vulnerability reports from CONTRIBUTING.mdPosiblemente ocupada @young1lin la tomó hace 3 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
TestTimeout abandons three delay/10 requests and later tests wait out the serverQuizá libre de nuevo @hananbahi527 la tomó hace 16 días y no hay ningún pull request abierto. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
Incorrect type annotation for iter_linesQuizá libre de nuevo @nightcityblade la tomó hace 36 días y no hay ningún pull request abierto. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Todos los issues de psf/requests
Issues similares
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
[Bug] PROPOSE docs promise approval before saving, but save_learning has no confirmation flagAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are droppedPosiblemente ocupada @sohom-cs la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Arize-ai/openinference#4199 · 1 reacción ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
MichaelYcJo/SpecSeal#1192 ·