Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
98c5389
Refuse synced ids that could walk a path out of the attachment cache
EarMaster Oct 11, 2026
af81fca
Never upload a file whose path came from sync
EarMaster Oct 11, 2026
fa27c4e
Refuse drive-prefixed entries in an import archive
EarMaster Oct 11, 2026
ac4bd99
Badge hashtags by walking text nodes, not by splitting the HTML
EarMaster Oct 11, 2026
140b9f4
Drop plaintext records once the account is fully sealed
EarMaster Oct 11, 2026
0b8ff18
Shrink what a script in the app window could reach
EarMaster Oct 11, 2026
36d357b
Bump DOMPurify and Svelte, pin drag-rs, stop allowing id and name
EarMaster Oct 11, 2026
365c218
Show the upgrade state when the cloud refuses an unentitled account
EarMaster Oct 11, 2026
c6ced7f
Pin every workflow action to a commit and drop the signing keys after…
EarMaster Oct 11, 2026
24830cf
Keep the website deploy token out of the job that runs app code
EarMaster Oct 11, 2026
3755c82
Send the session token in a header when opening the sync socket
EarMaster Oct 11, 2026
b7c120f
Accept a stashpad:// sign-in link only if this dialog asked for it
EarMaster Oct 11, 2026
35dacfe
Make AI provider requests from the backend, and close the window's ne…
EarMaster Oct 11, 2026
046610f
Only read or write outside files the user dropped or picked
EarMaster Oct 11, 2026
d705635
Show finished stash links as done instead of struck through
EarMaster Oct 11, 2026
4c08aa7
Search stashes by text, with typo tolerance, across one context or all
EarMaster Oct 11, 2026
1a8868f
chore: bump version to v1.11.0
EarMaster Oct 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,17 @@ jobs:

- name: Checkout code
if: env.SKIP != 'true'
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Initialize CodeQL
if: env.SKIP != 'true'
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Analyze
if: env.SKIP != 'true'
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@24c54180a607b1449ed407dd24f251e4e9147c8d # v4
with:
category: "/language:${{ matrix.language }}"
37 changes: 27 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
tag: ${{ steps.decide.outputs.tag }}
prerelease: ${{ steps.decide.outputs.prerelease }}
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Full history and tags: the compare link in the release body is built from the
# previous tag, and a shallow clone has neither.
fetch-depth: 0

- uses: actions/setup-node@v7
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22

Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
echo "--- release notes ---"
cat release-notes.md

- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: release-notes
path: release-notes.md
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
outputs:
release_id: ${{ steps.create.outputs.release_id }}
steps:
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: release-notes

Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
# for a cold dependency cache.
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0

Expand All @@ -293,14 +293,15 @@ jobs:
sudo rm -rf /opt/ghc /usr/local/share/boost >/dev/null 2>&1 &

- name: setup node
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
cache: 'npm'

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable branch
with:
toolchain: stable
# Those targets are only used on macos runners so it's skip on linux and windows
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

Expand All @@ -309,7 +310,7 @@ jobs:
# roughly 600 of windows-latest's 694. test.yml has cached since it was written; the
# build matrix simply never got one.
- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: src-tauri -> target

Expand Down Expand Up @@ -443,7 +444,7 @@ jobs:
# is what the in-app updater renders, and composing it once per leg is five more
# chances for the release body and the update notes to come apart - which is how they
# came apart before.
- uses: actions/download-artifact@v8
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: release-notes

Expand All @@ -458,7 +459,7 @@ jobs:
printf '%s\n' "$delim"
} >> "$GITHUB_ENV"

- uses: tauri-apps/tauri-action@v1
- uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # action-v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -505,6 +506,22 @@ jobs:

args: ${{ matrix.args }}

# The signing keys went into $GITHUB_ENV above, conditionally, because an exported
# empty value makes the bundler try to sign with nothing and fail - so they cannot
# simply be scoped to the tauri-action step with `env:`. That leaves them visible to
# every later step, and post-steps such as rust-cache's run with the job's environment
# at the very end. Blank them as soon as the build is done, whatever its outcome, so
# nothing after this point can read the updater key or the Apple credentials.
- name: Forget the signing secrets
if: always()
shell: bash
run: |
for name in TAURI_SIGNING_PRIVATE_KEY TAURI_SIGNING_PRIVATE_KEY_PASSWORD \
APPLE_CERTIFICATE APPLE_CERTIFICATE_PASSWORD APPLE_SIGNING_IDENTITY \
APPLE_ID APPLE_PASSWORD APPLE_TEAM_ID; do
echo "$name=" >> "$GITHUB_ENV"
done

publish:
name: Publish release
needs: [prepare, draft, build]
Expand Down
42 changes: 37 additions & 5 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,30 @@ concurrency:
group: screenshots
cancel-in-progress: false

# Nothing here needs to write to this repository.
permissions:
contents: read

jobs:
# Runs the app's code and every dependency's, so it holds no secret at all. The website
# token used to be checked out in this same job, after `npm ci` and the capture had run,
# where anything they left running could read it from website/.git/config and push to
# the website's main - which is a production deploy.
capture:
name: Capture and publish to the website
name: Capture
runs-on: ubuntu-latest
steps:
- name: Check out the app
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# A release event's default checkout is the default branch, not the released
# commit. Photographing main would silently ship pictures of work that has not
# been released yet.
ref: ${{ github.event.release.tag_name || inputs.ref }}

- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"
cache: "npm"
Expand All @@ -58,8 +67,28 @@ jobs:
SCREENSHOT_VERSION: ${{ github.event.release.tag_name || '' }}
run: npm run screenshots

- name: Hand the pictures to the publish job
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: screenshots
path: screenshots/out
retention-days: 1
if-no-files-found: error

# Holds the website token, and runs nothing but git and cp.
publish:
name: Publish to the website
needs: capture
runs-on: ubuntu-latest
steps:
- name: Receive the pictures
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: screenshots
path: screenshots/out

- name: Check out the website
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: EarMaster/stashpad-website
# A fine-grained PAT with contents:write on the website repo. The default
Expand All @@ -78,6 +107,10 @@ jobs:

- name: Commit and push, if anything actually changed
working-directory: website
# The tag goes through the environment, never into the script text: a
# perfectly valid tag name containing `$(...)` would otherwise have run as shell.
env:
VERSION: ${{ github.event.release.tag_name || 'a manual run' }}
run: |
git config user.name 'stashpad-bot'
git config user.email 'noreply@stashpad.org'
Expand All @@ -93,7 +126,6 @@ jobs:
exit 0
fi

VERSION="${{ github.event.release.tag_name || 'a manual run' }}"
git commit -m "Update the app screenshots for ${VERSION}" -m \
"Regenerated from the released build by the app's screenshots workflow."
git push
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.head.sha || github.sha }}
cancel-in-progress: true

# Tests read the code and nothing else; the token they get says so, whatever the repository
# default is.
permissions:
contents: read

jobs:
# Green between releases, since package.json and the newest CHANGELOG.md heading agree.
# It goes red in the window between a version bump and a written changelog - which is
Expand All @@ -47,10 +52,10 @@ jobs:
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"

Expand All @@ -69,10 +74,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"
cache: "npm"
Expand All @@ -97,7 +102,7 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v7
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
# `files`, plural: v5 deprecated the singular `file`, and a v7 that does not
# recognise the input uploads nothing while still reporting success.
Expand All @@ -116,7 +121,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# Backgrounded, because as a blocking step this cost 91 seconds in a job whose actual
# work - `cargo test` - takes 24. Almost all of it is /usr/local/lib/android, nine
Expand Down Expand Up @@ -145,8 +150,9 @@ jobs:
# and pins a deprecated Node runtime - tolerable in an advisory job, a latent hard failure
# now that this suite gates every release.
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@686976e191b89faba57d3206551f0f330d8cb249 # stable branch
with:
toolchain: stable
components: rustfmt, clippy

# `save-if` is what keeps this affordable. Every push and every pull_request run used to
Expand All @@ -166,7 +172,7 @@ jobs:
# roughly daily. A `Cargo.lock` or rustc change between releases means develop runs cold
# until the next one - the honest cost of three entries instead of nine.
- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
uses: swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
workspaces: src-tauri -> target
save-if: ${{ github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -204,12 +210,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# 22, matching every other job and the toolchain the release actually builds on. This was
# 20, which is a poor thing for a release gate to be compiling against.
- name: Setup Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: "22"
cache: "npm"
Expand Down
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface IStorageService {

### 3.2 Implementation Strategy

1. **`src/lib/services/adapters/desktop.adapter.ts`**: Implements `IStorageService` using Tauri `invoke` commands and `tauri-plugin-fs`.
1. **`src/lib/services/adapters/desktop.adapter.ts`**: Implements `IStorageService` using Tauri `invoke` commands.
2. **`src/lib/services/index.ts`**: Detects environment and exports the correct adapter.
```typescript
// Pseudo-code
Expand Down
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,72 @@ popover, not for the person who wrote the commit.

## [Unreleased]

## [1.11.0] - 2026-10-11

### Added
- **Search your stashes with Cmd+F (Ctrl+F on Windows and Linux).** It searches the current
context; press it again to search all of them. Unlike finding text on the page, it also
looks through completed stashes, the hidden part of long stashes, AI-enhanced versions and
attachment names, and it forgives typos and unfinished words. Matching stashes open up with
the words marked, and a result from another context takes you there

### Changed
- **When a subscription ends, Stashpad says so instead of showing a sync error.** If the cloud
no longer counts your account as entitled to sync - a subscription that ran out while the
app stayed signed in - sync now stops and Settings offers the upgrade, rather than failing
with the same error every few minutes. A full cloud storage is reported in plain words too
- **A link to a finished stash now looks finished, not deleted.** Links to completed stashes
were struck through, which read as if the stash were gone. They now show the checkmark in
green, like the complete button, and so does their hover preview. Strikethrough is kept for
links to stashes that were deleted. Link labels are also shorter, so a line of them stays
readable

### Security
- **A synced stash can no longer place files outside Stashpad's own folder.** Stash and
context ids from the cloud were used as folder names when an attachment was downloaded, so a
stash pushed with a crafted id could write a file anywhere on every device linked to the
account - including a folder whose contents run when you sign in. Ids that are not in the
expected format are now refused when they arrive, and downloads are checked to stay inside
the attachment cache
- **Stashpad only ever uploads files from its own attachment folder.** A file location
received through sync was stored and later read by the upload step, so a compromised sync
server could have named any file on your computer and had it uploaded. Synced attachments no
longer carry a location, and uploads refuse any file outside the attachment cache
- **A crafted import file can no longer write outside its folder on Windows.** An entry named
with a drive letter, such as `C:file.dll`, slipped past the check while the file was being
previewed, before you had confirmed anything. Import files now only accept plain names inside
the archive
- **Hashtags in a stash can no longer be used to sneak in page elements.** The step that turns
`#tags` into badges ran after the content was cleaned, and a link title written a particular
way let text through as real page elements, such as a form or an overlay. Tags are now found
in the text itself, so the cleaned content stays clean, and tags render exactly as before
- **An encrypted account no longer accepts unencrypted stashes from the server.** While an
account was being converted, unencrypted records were accepted on purpose, and that stayed
true after the conversion had finished - so the server could have slipped in content it never
encrypted. Once your account is fully encrypted, Stashpad now leaves such records out of the
sync instead of showing them
- **Changing the cloud server address now signs you out of the old one.** Your sign-in used to
carry over to whatever address was entered, so it would have been sent to that server too.
The app window can also no longer reach Stashpad's own settings and database files, only
attachments
- **Your sign-in no longer appears in web addresses during live sync.** The connection that
tells Stashpad about changes from your other devices carried your session in its address,
where servers along the way can log it. It now travels in a header instead. This version
needs the matching update to Stashpad Cloud, which ships with it
- **Only the browser page you opened from Stashpad can link it to an account.** While the link
dialog was open, any web page could open a Stashpad link of its own and connect the app to
a different account, so your stashes would sync there. The app now ignores links it did
not ask for; typing the code by hand works as before
- **Your AI provider key now stays inside Stashpad's backend.** The app window used to hold
the key and call the provider itself, so it had to be allowed to connect anywhere. The
backend now makes those requests, the window can no longer reach the network at all, and
Settings only shows that a key is saved. A saved key is kept for the endpoint it was
entered for: change the endpoint, and enter the key again
- **Stashpad only reads the files you give it.** The app window could read any file in your
Downloads, Desktop and Documents folders, and could ask the backend to attach a file from
anywhere on your computer. Now only files you drop on the window or choose in a file dialog
can be attached, imported or exported to, and the window itself can no longer read files

## [1.10.2] - 2026-10-05

### Added
Expand Down
Loading
Loading