Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Paths taken from table metadata are used without containment checks against the table location

Abierto
#3,973 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

Start in pyiceberg/catalog/init.py at Catalog.purge_table and trace delete_data_files, then inspect LocationProvider.init in pyiceberg/table/locations.py and the WRITE_DATA_PATH and WRITE_METADATA_PATH handling. Determine how containment should be checked without breaking documented redirected locations. Done means paths outside the table location cannot be acted on, with regression coverage for both deletion and write-path cases.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

Two places where a path read from table metadata is acted on without any check that it falls under the table's own location.

1. purge_table deletes whatever paths the manifests name

Catalog.purge_table (pyiceberg/catalog/__init__.py) walks every snapshot, collects manifests, manifest lists and previous metadata files, and calls delete_data_files(io, manifests_to_delete). The file_path entries inside those manifests are followed as given. Nothing constrains them to the table's location, so a manifest naming a path elsewhere in the warehouse results in a delete against that path, performed with the credentials of whoever ran the purge.

2. write.data.path and write.metadata.path are accepted verbatim

if path := table_properties.get(TableProperties.WRITE_DATA_PATH):
    self.data_path = path.rstrip("/")
else:
    self.data_path = f"{self.table_location.rstrip('/')}/data"

LocationProvider.__init__ (pyiceberg/table/locations.py) takes the configured value as-is. Subsequent writes for that table go wherever it points, again with the writing principal's credentials.

Note that redirecting the write location is the documented purpose of these two properties, so the gap is the absence of a containment check rather than the fact that the properties are honoured at all.


Issue investigation generated via claude, reviewed by Sung, Kevin, Fokko.

Lenguaje dominante
Python
Estrellas
1.1k
Forks
589
Merge medio
2 d 2 h
PR fusionados (30 d)
70

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iceberg-python

Todos los issues de apache/iceberg-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.