getContainerElements can return urls outside of the container
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- typescript
Línea de trabajo
Comienza en src/util/containerLogic.ts, en getContainerElements, y reproduce el comportamiento con el ejemplo de Turtle del issue. Asegúrate de que el resultado incluya únicamente recursos bajo la URL del contenedor y, a continuación, verifica que las URL externas se excluyan de los elementos devueltos y no puedan tratarse como elementos secundarios.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I think intuitively the getContainerElements function should only return elements that have this folder as a parent (e.g. for /folder/ only /folder/* and not /other/). The current implementation allows any urls to be returned if the turtle file specifies this.
As an implication, when creating a folder with additional containment triples, these folders:
- recursive deletion can delete arbitrary urls (not tested, but the code looks like it would simply fetch all "contained" resources and then delete them, even if they are on a different server)
- are displayed to have children that could be arbitrary urls (tested, see below for an example)
Creating folders with additional containment triples is currently possible with ESS. Also note that it's not forbidden by the spec to add additional data when POSTing new folders, so it's something we should consider in the applications. An example turtle is following, which will display the public folder inside of confusion/:
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix me: <https://storage.inrupt.com/ba39f662-260a-415e-aee1-3290e3974092/reviews/confusion/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
me: rdf:type ldp:Container , ldp:BasicContainer ;
ldp:contains <https://sheep.solidcommunity.net/public/> .
Currently you can test this here, not sure how long I'll keep the link (note that it shows a folder of inrupt.com, but contains a child from solidcommunity.net): https://solidos.github.io/mashlib/dist/browse.html?uri=https%3A%2F%2Fstorage.inrupt.com%2Fba39f662-260a-415e-aee1-3290e3974092%2Freviews%2Fconfusion%2F
As a fix, I'd suggest that getContainerElements filters out urls that do not start with the container url. eg for the container https://example.org/public/ it should have the filter urls.filter(url => url.startsWith("https://example.org/public/")) (not sure how this looks like with rdflib objects).
- Lenguaje dominante
- TypeScript
- Estrellas
- 12
- Forks
- 13
- Merge medio
- 15 h 15 min
- PR fusionados (30 d)
- 3
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 SolidOS/solid-logic
-
Migrate to Vite Abierto
SolidOS/solid-logic#314 · 1 asignado ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
SolidOS/solid-logic#291 · 2 comentarios ·
-
bug
SolidOS/solid-logic#290 · 1 asignado ·
-
enhancement
SolidOS/solid-logic#274 · 4 comentarios · 2 asignados ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
SolidOS/solid-logic#76 · 2 comentarios ·
Todos los issues de SolidOS/solid-logic
Issues similares
-
blocklist removal
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100