From 7feebeb43f342a5f2ea86a689b8b43c742e04d81 Mon Sep 17 00:00:00 2001 From: momar3632 <92117941+momar3632@users.noreply.github.com> Date: Fri, 11 Sep 2026 20:55:53 +0300 Subject: [PATCH 1/4] fix(tauri): add sidecar binary stubs for macos and linux target triples --- src-tauri/binaries/wfreerdp-aarch64-apple-darwin | 3 +++ src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu | 3 +++ src-tauri/binaries/wfreerdp-x86_64-apple-darwin | 3 +++ src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu | 3 +++ 4 files changed, 12 insertions(+) create mode 100755 src-tauri/binaries/wfreerdp-aarch64-apple-darwin create mode 100755 src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu create mode 100755 src-tauri/binaries/wfreerdp-x86_64-apple-darwin create mode 100755 src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu diff --git a/src-tauri/binaries/wfreerdp-aarch64-apple-darwin b/src-tauri/binaries/wfreerdp-aarch64-apple-darwin new file mode 100755 index 0000000..20fcf8c --- /dev/null +++ b/src-tauri/binaries/wfreerdp-aarch64-apple-darwin @@ -0,0 +1,3 @@ +#!/bin/sh +echo "FreeRDP sidecar is only supported on Windows target" +exit 1 diff --git a/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu b/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu new file mode 100755 index 0000000..20fcf8c --- /dev/null +++ b/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu @@ -0,0 +1,3 @@ +#!/bin/sh +echo "FreeRDP sidecar is only supported on Windows target" +exit 1 diff --git a/src-tauri/binaries/wfreerdp-x86_64-apple-darwin b/src-tauri/binaries/wfreerdp-x86_64-apple-darwin new file mode 100755 index 0000000..20fcf8c --- /dev/null +++ b/src-tauri/binaries/wfreerdp-x86_64-apple-darwin @@ -0,0 +1,3 @@ +#!/bin/sh +echo "FreeRDP sidecar is only supported on Windows target" +exit 1 diff --git a/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu b/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu new file mode 100755 index 0000000..20fcf8c --- /dev/null +++ b/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu @@ -0,0 +1,3 @@ +#!/bin/sh +echo "FreeRDP sidecar is only supported on Windows target" +exit 1 From e1d17459e32db4fa59a6ab6c8914903d63fa219f Mon Sep 17 00:00:00 2001 From: momar3632 <92117941+momar3632@users.noreply.github.com> Date: Fri, 11 Sep 2026 20:58:14 +0300 Subject: [PATCH 2/4] fix(ci): use package.json version for release tag and name on manual workflow dispatch --- .github/workflows/release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fad8a2..1524cfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,6 +55,11 @@ jobs: with: workspaces: src-tauri - run: bun install --frozen-lockfile + - name: Get app version + id: get_version + run: | + VERSION=$(node -p "require('./package.json').version") + echo "version=v$VERSION" >> $GITHUB_OUTPUT - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -68,8 +73,8 @@ jobs: APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} with: - tagName: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || format('build-{0}', github.run_id) }} - releaseName: ${{ startsWith(github.ref, 'refs/tags/v') && format('SSHBool {0}', github.ref_name) || format('SSHBool build-{0}', github.run_id) }} + tagName: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || steps.get_version.outputs.version }} + releaseName: ${{ startsWith(github.ref, 'refs/tags/v') && format('SSHBool {0}', github.ref_name) || format('SSHBool {0}', steps.get_version.outputs.version) }} releaseBody: "See the docs for changelog." releaseDraft: false prerelease: false From 2339f0782bb743fc2b60cf20df2d29e0b1ac58a9 Mon Sep 17 00:00:00 2001 From: momar3632 <92117941+momar3632@users.noreply.github.com> Date: Fri, 11 Sep 2026 21:14:13 +0300 Subject: [PATCH 3/4] fix(db): filter comment lines before splitting SQL statements on semicolon in migration runner --- src-tauri/crates/infrastructure/src/db.rs | 19 ++++++++++--------- .../0018_reset_unverified_known_hosts.sql | 3 ++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src-tauri/crates/infrastructure/src/db.rs b/src-tauri/crates/infrastructure/src/db.rs index 3e4dd88..9faf33d 100644 --- a/src-tauri/crates/infrastructure/src/db.rs +++ b/src-tauri/crates/infrastructure/src/db.rs @@ -183,15 +183,16 @@ async fn backfill_legacy_migrations(pool: &SqlitePool) -> Result<(), DomainError } async fn run_migration_sql(pool: &SqlitePool, id: &str, sql: &str) -> Result<(), DomainError> { - // Split on `;` and strip comment-only lines. Do NOT skip a whole chunk just because - // it begins with a `--` header comment (that used to drop CREATE TABLE statements). - for stmt in sql.split(';') { - let meaningful = stmt - .lines() - .map(str::trim) - .filter(|l| !l.is_empty() && !l.starts_with("--")) - .collect::>() - .join("\n"); + // Strip comment lines starting with `--` BEFORE splitting on `;` so semicolons in comments don't break statements. + let clean_sql = sql + .lines() + .map(str::trim) + .filter(|l| !l.starts_with("--")) + .collect::>() + .join("\n"); + + for stmt in clean_sql.split(';') { + let meaningful = stmt.trim(); if meaningful.is_empty() { continue; } diff --git a/src-tauri/migrations/0018_reset_unverified_known_hosts.sql b/src-tauri/migrations/0018_reset_unverified_known_hosts.sql index f3dd4d1..5e3f154 100644 --- a/src-tauri/migrations/0018_reset_unverified_known_hosts.sql +++ b/src-tauri/migrations/0018_reset_unverified_known_hosts.sql @@ -1,3 +1,4 @@ -- 0018_reset_unverified_known_hosts.sql -- One-time reset for VULN-01 (legacy auto-trusted fingerprints). --- The DELETE ran once during the original release; do not re-run on every startup. +-- The DELETE ran once during the original release - do not re-run on every startup. +SELECT 1; From 98412bae2a570499499478f0bc199f5e2160e8bd Mon Sep 17 00:00:00 2001 From: momar3632 <92117941+momar3632@users.noreply.github.com> Date: Fri, 11 Sep 2026 21:28:14 +0300 Subject: [PATCH 4/4] fix(tauri): bundle wfreerdp as a platform resource instead of externalBin sidecar --- src-tauri/binaries/wfreerdp-aarch64-apple-darwin | 3 --- src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu | 3 --- src-tauri/binaries/wfreerdp-x86_64-apple-darwin | 3 --- src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu | 3 --- src-tauri/tauri.conf.json | 2 +- 5 files changed, 1 insertion(+), 13 deletions(-) delete mode 100755 src-tauri/binaries/wfreerdp-aarch64-apple-darwin delete mode 100755 src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu delete mode 100755 src-tauri/binaries/wfreerdp-x86_64-apple-darwin delete mode 100755 src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu diff --git a/src-tauri/binaries/wfreerdp-aarch64-apple-darwin b/src-tauri/binaries/wfreerdp-aarch64-apple-darwin deleted file mode 100755 index 20fcf8c..0000000 --- a/src-tauri/binaries/wfreerdp-aarch64-apple-darwin +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo "FreeRDP sidecar is only supported on Windows target" -exit 1 diff --git a/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu b/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu deleted file mode 100755 index 20fcf8c..0000000 --- a/src-tauri/binaries/wfreerdp-aarch64-unknown-linux-gnu +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo "FreeRDP sidecar is only supported on Windows target" -exit 1 diff --git a/src-tauri/binaries/wfreerdp-x86_64-apple-darwin b/src-tauri/binaries/wfreerdp-x86_64-apple-darwin deleted file mode 100755 index 20fcf8c..0000000 --- a/src-tauri/binaries/wfreerdp-x86_64-apple-darwin +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo "FreeRDP sidecar is only supported on Windows target" -exit 1 diff --git a/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu b/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu deleted file mode 100755 index 20fcf8c..0000000 --- a/src-tauri/binaries/wfreerdp-x86_64-unknown-linux-gnu +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -echo "FreeRDP sidecar is only supported on Windows target" -exit 1 diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 8edaa6b..f4e3a99 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -66,8 +66,8 @@ "bundle": { "active": true, "targets": "all", - "externalBin": ["binaries/wfreerdp"], "resources": { + "binaries/wfreerdp-x86_64-pc-windows-msvc.exe": "binaries/wfreerdp-x86_64-pc-windows-msvc.exe", "binaries/guacd/README.md": "binaries/guacd/README.md", "../scripts/download-guacd.ps1": "scripts/download-guacd.ps1" },