server: drag-drop config path — fail-fast single-issue validation, unbounded drop payload, .yaml/.yml whitelist asymmetry
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, python, yaml
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 1
- Forks
- 1
- Avg merge
- 4h 46m
- Merged PRs (30d)
- 55
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from falbany/ProFiles
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
falbany/ProFiles#187 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in falbany/ProFiles
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ip-tools/patzilla#219 · 2 comments ·
Maintainers usually reply within 1 day
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesOpenpriority:p3 technical-debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jimmy058910/jmo-security-repo#1673 ·
Maintainers usually reply within 1 day
-
enhancement ready
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
integration: frontier_silicon
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
home-assistant/core#193176 · 2 comments ·
Maintainers usually reply within 1 day
-
task create and task update take --body-file and --stdinPossibly taken @JuanBarriosS claimed this today. Opencli enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
pyrite-wiki/pyrite#1687 · 1 comment ·
Maintainers usually reply within 1 day