server: drag-drop config path — fail-fast single-issue validation, unbounded drop payload, .yaml/.yml whitelist asymmetry
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, python, yaml
調査の方向性
Start with web/src/utils/configDrop.ts, routes/config.py, core/config/diagnostics.py, and config.py; trace the drop, content-load, validation, disk-load, and Save As paths. Compare collect_config_issues with ConfigReader.from_content, then inspect the existing suffix rules and request handling. Done means dropped drafts report all validation issues, oversized payloads are limited, and drop, load, and Save As accept consistent extensions; also check the multi-file drop behavior.
索引モデルが issue の本文から書いたものです。
説明
Problem
End-to-end walk of the drag-drop-config path (web/src/utils/configDrop.ts → POST /api/config/load-content → ConfigReader.from_content):
- Validation gap. The drop endpoint validates via
ConfigReader.from_content, which is deliberately fail-fast ("raises on the first problem", per its own docstring and the header ofcore/config/diagnostics.py) — a dropped draft with 4 problems reports only the first, while the editor's/validatepath returns all issues viacollect_config_issues(already wired intovalidate_issuesatroutes/config.py:187-203). Same data, two reporting modes; #111 made the editor multi-issue but the drop path did not follow. - Size/encoding guard.
handleDroppedConfigreadsawait file.text()with no size limit and POSTs it as one JSON body; the server accepts any body size. Dropping a multi-hundred-MB.yamlfreezes the tab and spikes server memory. - Whitelist asymmetry. Drops accept
.yaml/.yml(_ACCEPTED_DROP_SUFFIXES,routes/config.py:237-243), butSAVE_AS_EXTENSIONS(config.py:481) only allows.profiles/.profiles.yaml— a user who dropsmy.yaml, edits it, then presses Save As is forced to rename; andPOST /config/load(disk path) rejects.yaml/.ymltoo (_is_config_path,config.py:64-73), so a.ymltrial cannot be re-opened from disk. - Minor:
pickConfigFile(configDrop.ts:23-30) silently drops all but the first accepted file in a multi-file drop.
Suggested fix
- In
load_content_endpoint, build the 400detailfromcollect_config_issues(payload.content)instead of the firstValueError. - Add a client-side size check (e.g. 2 MB) in
handleDroppedConfigand a server body limit. - Align the three whitelists (drop / load / save-as) on one shared tuple.
- Surface "N of M files ignored" or pick by extension priority in
pickConfigFile.
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 4時間 46分
- マージ済み PR(30日)
- 55
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
falbany/ProFiles のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
falbany/ProFiles#187 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
falbany/ProFiles の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ip-tools/patzilla#219 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesオープンpriority:p3 technical-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jimmy058910/jmo-security-repo#1673 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ready
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
integration: frontier_silicon
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
home-assistant/core#193176 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
task create and task update take --body-file and --stdin対応中かも @JuanBarriosS が今日担当しました。 オープンcli enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
pyrite-wiki/pyrite#1687 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信