getContainerElements can return urls outside of the container
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu tại src/util/containerLogic.ts, ở getContainerElements, và tái hiện hành vi bằng ví dụ Turtle trong issue. Đảm bảo kết quả chỉ bao gồm các tài nguyên nằm dưới URL của container, sau đó xác minh rằng các URL bên ngoài bị loại khỏi các phần tử được trả về và không thể được coi là phần tử con.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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).
- Ngôn ngữ chính
- TypeScript
- Star
- 12
- Fork
- 13
- Merge trung bình
- 15 giờ 15 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SolidOS/solid-logic
-
Migrate to Vite Đang mở
SolidOS/solid-logic#314 · 1 người được giao ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
SolidOS/solid-logic#291 · 2 bình luận ·
-
bug
SolidOS/solid-logic#290 · 1 người được giao ·
-
enhancement
SolidOS/solid-logic#274 · 4 bình luận · 2 người được giao ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
SolidOS/solid-logic#76 · 2 bình luận ·
Tất cả issue của SolidOS/solid-logic
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
mksglu/context-mode#1200 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/claude-code#96687 ·
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
AOSSIE-Org/DebateAI#582 · 2 bình luận ·