Repository navigation
fix: address open issues #169 (version), #170 (XSS), #173 (SSRF) - #176
Merged
Merged
Conversation
#170 — Stored XSS via library folder names: folder.name was interpolated raw into innerHTML in the folder render path. Escape it with the existing esc() helper (catalog.js), matching the track render paths. #173 — SoundCloud SSRF surface: drop the on.soundcloud.com share shortener from the host allowlist (it redirects to arbitrary targets) and add a yt-dlp extractor allowlist (allowed_extractors=[youtube, soundcloud]) so a URL that slips past host validation can't invoke the generic extractor. #169 — Version stuck at 0.6.0-alpha.2 for source/Docker/self-hosted: make the version git-tag-derived via hatch-vcs (pyproject dynamic version, app/_version.py build artifact). app_version() now reads package metadata -> _version.py -> dev placeholder; static/version.json is removed (now a build artifact, gitignored). Install sites pin SETUPTOOLS_SCM_PRETEND_VERSION from the release version so shallow CI clones / Docker (no .git) don't break (Dockerfile, make-runtime-pack.sh, make-portable.ps1). make-app.sh defaults VERSION to `git describe`. Desktop version literals (Cargo.toml, package.json, tauri.conf.json) are now 0.0.0 placeholders stamped from the tag at build. The update-check no longer nags dev/source builds. Tests: 81 passed; ruff clean; app_version derives correctly.
The hatch-vcs build hook writes app/_version.py during uv sync, and CI's `ruff format --check app/` tripped on it (it's gitignored but present on disk during lint). Add it to ruff's exclude list.
CI runs uv sync in every step, which builds the editable package and
triggers hatch-vcs/setuptools_scm. On Woodpecker's shallow, tagless clone
setuptools_scm raises ("unable to detect version"), failing the lint step
before ruff runs (and skipping the rest).
- Set SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 in the uv-based CI steps so the
build never invokes git for the version (CI only lints/tests, never ships).
- Add hatch-vcs fallback-version as a second safety net for shallow source
installs outside CI.
Verified: uv sync --frozen --all-extras succeeds with the env set.
Folder names now accept only letters (any language), digits, spaces, and a
small safe punctuation set (- _ ' & ( ) . ,). Names with markup or symbols
(e.g. the XSS probe, or ±!@£$%^&*()_+{:"|?><) are rejected on Save with an
inline message instead of being created. Complements the render-time escaping
from #170 by blocking such names at the source.
Bump the editor input maxlength from 48 to 100 and reject over-length names on Save with an inline message (defensive, in case the cap is bypassed).
thcp
marked this pull request as ready for review
June 2, 2026 13:02
This was referenced Jun 2, 2026
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.
Addresses three open issues in one branch.
#170 — Stored XSS via library folder names
folder.namewas interpolated raw intoinnerHTMLin the folder render path while the track paths already escape. Now escaped with the existingesc()helper (static/js/catalog.js).#173 — SoundCloud SSRF surface
on.soundcloud.com(the share shortener → redirects to arbitrary targets) from the host allowlist.allowed_extractors=["youtube","soundcloud"]) so a URL slipping past host validation can't invoke the generic extractor / arbitrary network target.app/pipeline/download.py; test updated (on.soundcloud.comnow rejected).#169 — Version stuck at
0.6.0-alpha.2for source/Docker/self-hostedMake the git tag the single source of truth via hatch-vcs — no version is hand-edited.
pyproject.toml→dynamic = ["version"]+hatch-vcs(writesapp/_version.pyat build).app_version()reads package metadata →_version.py→ dev placeholder;static/version.jsonremoved (now a build artifact, gitignored)./api/healthreports the derived version.SETUPTOOLS_SCM_PRETEND_VERSIONfrom the release version so shallow CI clones / Docker (no.git) don't break:build/Dockerfile(--build-arg VERSION),make-runtime-pack.sh,make-portable.ps1.make-app.shdefaultsVERSIONtogit describe.Cargo.toml,package.json,tauri.conf.json) are now0.0.0placeholders stamped from the tag at build (Woodpeckerprepare+ make-scripts).Version model: a clean tagged checkout reports the exact release (
0.7.0a4);mainbetween tags reports a dev version (0.7.0a5.dev3+g…). "Latest version" = the most recent tag.Verification
node --checkclean.app_version()verified: dirty tree →0.7.0a5.dev0+g0e84166…;uv.lockno longer pins a stale version.--build-arg, Woodpecker, desktop packs) edited to feed the version but not runnable here — verify on a release build before tagging.Deferred (not in this PR): #171 (CSP) and #172 (macOS ffmpeg checksum).
Closes #169
Closes #170
Closes #173