File titles and album names come from server data that quak does not trust. Before this change a title such as ../../.ssh/authorized_keys could name a path outside the chosen directory. Now src/filename.ts is the one place that makes such names safe. It is used by quak get and quak get-thumb without --out, by downloadFile and downloadThumbnail without outPath, and by the backup and metadata backup trees. Separators, control characters and NUL become _. A leading run of dots becomes _, and a Windows device name gets a _ prefix. An empty title falls back to file-<id>.
The extension used in the originals cache may contain only letters and digits. Anything else becomes .bin.
A path the user gives (--out, outPath) is still used exactly as given. A comment in the code states this.
decryptFile now turns a missing or non-string title into "". It throws a clear error when the metadata is not a JSON object; before, that case failed with a TypeError.
Things to know:
Judgement call: all callers now share the backup's existing character set. For quak get, a title containing :*?"<>| now becomes a file name with _ in place of those characters. Titles without them come out exactly as before.
Rule suppressed: no-control-regex, on the one regular expression that matches control characters.
The download tests change the working directory into a temporary directory. With no outPath, the file is written to the working directory, and it must not land in the repo.
Model: opus-5-5
Implements https://git.eeqj.de/sneak/quak/issues/9.
File titles and album names come from server data that quak does not trust. Before this change a title such as `../../.ssh/authorized_keys` could name a path outside the chosen directory. Now `src/filename.ts` is the one place that makes such names safe. It is used by `quak get` and `quak get-thumb` without `--out`, by `downloadFile` and `downloadThumbnail` without `outPath`, and by the backup and metadata backup trees. Separators, control characters and NUL become `_`. A leading run of dots becomes `_`, and a Windows device name gets a `_` prefix. An empty title falls back to `file-<id>`.
The extension used in the originals cache may contain only letters and digits. Anything else becomes `.bin`.
A path the user gives (`--out`, `outPath`) is still used exactly as given. A comment in the code states this.
`decryptFile` now turns a missing or non-string title into `""`. It throws a clear error when the metadata is not a JSON object; before, that case failed with a `TypeError`.
Things to know:
- Judgement call: all callers now share the backup's existing character set. For `quak get`, a title containing `:*?"<>|` now becomes a file name with `_` in place of those characters. Titles without them come out exactly as before.
- Rule suppressed: `no-control-regex`, on the one regular expression that matches control characters.
- The download tests change the working directory into a temporary directory. With no `outPath`, the file is written to the working directory, and it must not land in the repo.
Model: opus-5-5
A file title or album name decrypted from server data could name a path
outside the chosen directory (`../../.ssh/authorized_keys`). One module,
src/filename.ts, now makes such names safe for `quak get`/`get-thumb`
without `--out`, downloadFile/downloadThumbnail without outPath, and the
backup and metadata backup trees. Originals-cache extensions are limited to
letters and digits. A user-supplied path is still used as is. decryptFile
reads a missing or non-string title as "" and rejects metadata that is not
a JSON object.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Implements #9.
File titles and album names come from server data that quak does not trust. Before this change a title such as
../../.ssh/authorized_keyscould name a path outside the chosen directory. Nowsrc/filename.tsis the one place that makes such names safe. It is used byquak getandquak get-thumbwithout--out, bydownloadFileanddownloadThumbnailwithoutoutPath, and by the backup and metadata backup trees. Separators, control characters and NUL become_. A leading run of dots becomes_, and a Windows device name gets a_prefix. An empty title falls back tofile-<id>.The extension used in the originals cache may contain only letters and digits. Anything else becomes
.bin.A path the user gives (
--out,outPath) is still used exactly as given. A comment in the code states this.decryptFilenow turns a missing or non-string title into"". It throws a clear error when the metadata is not a JSON object; before, that case failed with aTypeError.Things to know:
quak get, a title containing:*?"<>|now becomes a file name with_in place of those characters. Titles without them come out exactly as before.no-control-regex, on the one regular expression that matches control characters.outPath, the file is written to the working directory, and it must not land in the repo.Model: opus-5-5
PASS on
047f63crebased ontonext2fe952d3.Model: opus-5-5