server: drag-drop config path — fail-fast single-issue validation, unbounded drop payload, .yaml/.yml whitelist asymmetry
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, python, yaml
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 1
- Fork
- 1
- Merge trung bình
- 4 giờ 46 phút
- Pull request đã merge (30 ngày)
- 55
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 falbany/ProFiles
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
falbany/ProFiles#187 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Web UI: config handoff from a second launch leaves the open YAML editor showing stale contentĐang mởbug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của falbany/ProFiles
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
ip-tools/patzilla#219 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesĐang mởpriority:p3 technical-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
integration: frontier_silicon
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
home-assistant/core#193176 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task create and task update take --body-file and --stdinCó thể đã có người làm @JuanBarriosS đã nhận hôm nay. Đang mởcli enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
pyrite-wiki/pyrite#1687 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày