Repository navigation
fix: security hardening, macOS aria2 lookup, aria2 stability and UI bugs - #5
Merged
Merged
Conversation
… in logs - Add safety module: sanitize remote filenames to a bare basename (blocks ../ and \ traversal, drive prefixes, illegal chars, reserved names); create_download / check_file_exists reject unsafe names. - Match civitai.com / huggingface.co / hf-mirror.com by exact host or subdomain instead of substring, in both backend and frontend, so tokens are never sent to look-alike domains. - Redact token-like query params from URLs in backend logs and forwarded aria2 output.
- Look for the aria2c sidecar next to the main executable (where Tauri places externalBin, e.g. Contents/MacOS) before resource_dir, and warn when falling back to PATH. - Add joinPath/getModelBaseDir helpers that follow the base path's separator style; replace hardcoded backslash joins in TaskInput, Search and Settings. - Workflow page now uses the same default `<comfyui_root>/models` base dir as the other pages instead of reporting every model missing.
… inputs - Serialize CivitaiModelInfo.model_type under its own name; the `rename = "type"` meant the frontend always read undefined. - TaskInput: changing the URL clears the previous filename, parse result and auto-selected folder; late results from an older URL are discarded; paste no longer triggers a duplicate parse; checkFileExists errors are surfaced instead of rejecting unhandled. - Settings store updates state synchronously and debounces DB writes and aria2 runtime sync, so typing no longer drops characters or pushes half-typed proxy URLs to aria2.
…cies react-router-dom was never imported and carried several advisories. shadcn is a CLI whose only runtime use is its Tailwind CSS import, which is resolved at build time, so it belongs in devDependencies; this also removes its server-side transitive deps (hono, express, MCP SDK) from the production tree. `npm audit` now reports 0 vulnerabilities.
Backend: - Retry aria2 startup with a fresh port (3 attempts) and retry the RPC connection with backoff instead of a single attempt after fixed sleeps; detect aria2 exiting immediately after spawn. - Give each websocket connection an id: tasks of a superseded socket can no longer clear the current connection, and old reader/writer tasks are aborted so notifications are not emitted twice after a reconnect. - A timed-out request only removes its own pending entry. - Reset the crash counter after 2 minutes of stable running; after an automatic restart, reconnect and re-emit `aria2://ready` so the frontend re-applies runtime settings. - Pass --no-conf and drop --rpc-allow-origin-all; cap the shutdown RPC at 2s so a hung aria2 cannot block app exit. Frontend: - Polling also looks up tracked gids missing from the active/waiting list, so completion/errors are not lost when a notification is missed; gids aria2 no longer knows (or `removed`) are marked paused so they can be resumed. Task status is re-read before writing to avoid overwriting a concurrent pause/cancel. - Reset aria2Ready on `aria2://error`.
mogurt
force-pushed
the
fix/review-issues
branch
from
September 28, 2026 06:52
b08316f to
dca8762
Compare
…rty feed The macOS binaries came from AnInsomniacy/aria2-builder, which no longer exists (404), breaking `npm ci` on macOS and therefore all CI. - Pin aria2 1.37.0 and verify SHA256 of every download (hashes cross-checked against the Homebrew and Scoop package definitions). - macOS: aria2 ships no macOS binaries, so build the official source tarball using only system frameworks (AppleTLS, no Homebrew libs) with a 10.15 deployment target, and verify via otool that the result links only system libraries. Drop the silent fallback to a PATH aria2c, which would bundle a Homebrew-linked binary that breaks on users' machines. - Windows: use the official GitHub release zip instead of a SourceForge mirror resolved from "latest". - Allow ARIA2C_PATH to supply a local binary. - Cache src-tauri/binaries in CI keyed on the script hash. - Update THIRD_PARTY_NOTICES and READMEs accordingly.
release-please only ran on `dev`, which is no longer used (9 commits behind main), so no release PR was ever opened. - Run release-please on pushes to main, targeting main. - The existing v0.1.0 tag is not on main's history, so set bootstrap-sha to the current main tip; release-please ignores it after the first release PR, so it needs no cleanup. - Tags created with GITHUB_TOKEN do not trigger other workflows, so make release.yml callable (workflow_call) and invoke it from release-please when a release is created; release.yml checks out the release tag.
mogurt
pushed a commit
that referenced
this pull request
Sep 28, 2026
## [0.1.1](comfy-downloader-v0.1.0...comfy-downloader-v0.1.1) (2026-09-28) ### Bug Fixes * security hardening, macOS aria2 lookup, aria2 stability and UI bugs ([#5](#5)) ([8ee33ed](8ee33ed)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes from a full review of the app, one commit per area:
../,\, drive prefixes or reserved names.create_download/check_file_existsreject unsafe names.civitai.com.evil.net.externalBin) instead of only inResources/binaries.\path joins are replaced byjoinPath/getModelBaseDir.<comfyui_root>/modelsdir like the other pages.react-router-dom.shadcnto devDependencies.npm auditnow reports 0 vulnerabilities, down from 17.--no-confis set,--rpc-allow-origin-allis dropped, and exit waits at most 2s for aria2.AnInsomniacy/aria2-builder, which now returns 404 and brokenpm cion macOS. That breaks all CI, includingmain.otoolthat it links nothing from Homebrew.aria2c(Homebrew-linked, broken on users' machines).ARIA2C_PATHcan override the binary, and CI caches it.devbranch; it now runs onmain, withbootstrap-shaset because thev0.1.0tag is not inmain's history.release.yml(nowworkflow_call-able) to build the installers. This is needed because tags pushed withGITHUB_TOKENdon't trigger workflows.temp_scaffoldtoComfyDownloader.Testing
npm run lint(0 errors; 1 existing warning inTaskList.tsx)npm run typecheckcd src-tauri && cargo test: 18 passed, including new tests for filename sanitizing, host matching and URL redactioncargo fmt --check,npm run build,npm auditManual end-to-end test on Windows (
tauri dev, driven through the real UI):skipstrategy.aria2ctriggered an automatic restart and reconnect with no duplicate events.../../x,..\x.dll,C:\x) were rejected via real IPC, and nothing was written outside the target dir.