getContainerElements can return urls outside of the container
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- typescript
調査の方向性
src/util/containerLogic.ts の getContainerElements から始め、issue の Turtle 例で挙動を再現します。結果にコンテナ URL 配下のリソースのみが含まれることを確認し、その後、外部 URL が返された要素から除外され、子要素として扱えないことを検証します。
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- TypeScript
- スター
- 12
- フォーク
- 13
- 平均マージ
- 15時間 15分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SolidOS/solid-logic のほかの issue
-
Migrate to Vite オープン
SolidOS/solid-logic#314 · 担当者 1 名 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 42/100
SolidOS/solid-logic#291 · コメント 2 件 ·
-
bug
SolidOS/solid-logic#290 · 担当者 1 名 ·
-
enhancement
SolidOS/solid-logic#274 · コメント 4 件 · 担当者 2 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
SolidOS/solid-logic#76 · コメント 2 件 ·
SolidOS/solid-logic の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100