Repository navigation
fix(daemon): keep qsv get downloads private with qsv 26.x; name qsv 27.0.1 - #38
Merged
Merged
Conversation
qsv 26.x and older make their `get` cache with the umask's modes, and a download may be private (a CKAN token, a signed URL). With such a qsv (qsvdp or a source build; the prebuilt qsv has `get` from 27.0.0), qsv-clientd now points QSV_CACHE_DIR at `qsv-cache` in its own directory, made 0700, for both `get` and `get cache-fetch`, which must share one cache. qsv 27.0.0+ keeps its cache owner-only on Unix, so it is left alone, as is a QSV_CACHE_DIR the user set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`viz <URL>` and `register --download` stage the data in the folder the user chose for it. qsv writes `get cache-fetch --output` with the umask's mode (often 0644), and the file was made 0600 only after qsv finished, so another user could open it in the meantime if that folder was readable to them. qsv now writes into a 0700 directory made inside the staging folder (same filesystem); the file is made 0600 there, moved into place, and the directory is always removed. Fetch latest was never exposed: it stages in the daemon's own 0700 cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
qsv 27.0.0 was withdrawn before its release, so the README, the package description, the DAEMON.md example and the message shown with an older qsv now name 27.0.1. The version checks stay at 27.0.0: builds of qsv master that report 27.0.0 have every feature 27.0.1 does, and raising the floor would treat them as older qsv. The CHANGELOG notes the withdrawal, and its Security entries now say that only qsv 26.x or older with `get` was affected, since qsv 27 keeps the cache and `cache-fetch --output` owner-only itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage 99.29% 99.29%
=======================================
Files 30 30
Lines 4230 4247 +17
Branches 550 552 +2
=======================================
+ Hits 4200 4217 +17
Misses 16 16
Partials 14 14
🚀 New features to boost your workflow:
|
qsv 27.0.1 (dathere/qsv#4945) writes `get cache-fetch --output` with the umask's modes, as qsv's other writers do, so the staging fix protects downloads with current qsv too, not only with qsv 26.x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Privacy hardening for qsv-clientd's downloads through
qsv get, and the switch from qsv 27.0.0 (withdrawn) to 27.0.1 in user-facing text.Changes
getcache before qsv 27 (f59b657): with qsv 26.x or older that hasget(qsvdpor a source build; the prebuiltqsvhas it from 27.0.1),qsv-clientdsetsQSV_CACHE_DIRtoqsv-cachein its own directory, made 0700, for bothgetandget cache-fetch(they must share one cache). Those versions make their cache with the umask's modes. qsv 27 (fix(get): make the get cache and its dc: copies owner-only qsv#4928) keeps it owner-only itself, so it is left alone, as is aQSV_CACHE_DIRthe user set.viz <URL>andregister --downloadstage in the folder the user chose.cache-fetch --outputnow writes into a 0700mkdtempdirectory inside it; the file is made 0600 there, moved into place, and the directory is always removed. Before, the file was made 0600 only after qsv finished. Fetch latest was never exposed (it stages in the daemon's 0700 cache). This matters with current qsv too: qsv 27.0.1 writes--outputwith the umask's modes, like its other writers (fix(get): --output files follow the umask, not the cache's 0600 qsv#4945). Fixes roborev findings 5881 and 5918.serveand the tray show with an older qsv now name 27.0.1. The version checks (LIVE_SCHEMATICS_QSV,PRIVATE_GET_CACHE_QSV) stay at 27.0.0: builds of qsv master reporting 27.0.0 have every feature 27.0.1 does. The CHANGELOG notes the withdrawal; the released 0.6.0 notes are left as they were.Testing
getpath is exercised only by thefake_qsvtests: the prebuilt qsv 26.0.0 has noget, and noqsvdp26.x was available locally.mypy --platform win32clean; new lines fully covered.🤖 Generated with Claude Code