nodeSolidServer / nodeSolidServer/node-solid-server
Needed fix for corsProxy (server operators must read)
未關閉
還沒有人認領這個 Issue。
- 主要語言
- JavaScript
- 星號
- 1.8k
- 分支
- 308
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Action required
If you are an NSS server operator, please check that your settings use the default "corsProxy": false.
If you have a public facing server with "corsProxy": true, please change it to "corsProxy": false until the suggested fix below is deployed.
Fix
The CORS proxy needs to be changed as follows:
- If no
Originfield present in the HTTP request, respond with a400or similar. - If the
Originvalue in the request is not the server's configured domain (podhost.example) or a direct subdomain thereof (alice.podhost.example), respond with400or similar. - If, after satistying the above two conditions, the response received from the downstream server does not indicate an RDF content type in its headers (such as Turtle, HTML, etc.), respond with
400.- In particular, images, videos, PDFs etc. must result in a
400. - The connection to the downstream server can and should be closed prematurely if the content type is not RDF.
- In particular, images, videos, PDFs etc. must result in a
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先定位 corsProxy 的實作及其要求處理測試;該 issue 未指定任何檔案或測試。驗證缺少 Origin 值或 Origin 值未獲授權時的行為,以及下游回應不包含 RDF 內容類型時的行為。完成的標準是這些情況回傳 400 或類似結果,同時允許的 RDF 回應繼續正常運作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript, node.js
- 領域
- api, backend, security
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100