Skip to content

Commit 19e570f

Browse files
committed
ci: fix beta desktop and restore smoke checks
1 parent 4f235f1 commit 19e570f

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎.github/workflows/next-ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ jobs:
174174
shell: bash
175175
run: |
176176
test -x next/ui/apps/desktop/release/linux-unpacked/wepush-next
177-
xvfb-run -a env WEPUSH_DESKTOP_SMOKE_TEST=true next/ui/apps/desktop/release/linux-unpacked/wepush-next
177+
xvfb-run -a env WEPUSH_DESKTOP_SMOKE_TEST=true next/ui/apps/desktop/release/linux-unpacked/wepush-next --no-sandbox
178178
- name: Validate PowerShell, WinSW XML and Windows application
179179
if: runner.os == 'Windows'
180180
shell: pwsh

‎.github/workflows/next-release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
set -euo pipefail
198198
test -x next/ui/apps/desktop/release/linux-unpacked/wepush-next
199199
node -e 'const p=require("./next/ui/apps/desktop/release/linux-unpacked/resources/app/package.json");if(p.version!==process.env.VERSION)process.exit(1)'
200-
xvfb-run -a env WEPUSH_DESKTOP_SMOKE_TEST=true next/ui/apps/desktop/release/linux-unpacked/wepush-next
200+
xvfb-run -a env WEPUSH_DESKTOP_SMOKE_TEST=true next/ui/apps/desktop/release/linux-unpacked/wepush-next --no-sandbox
201201
name="wepush-next-desktop-$VERSION-linux-$ARCH"
202202
mkdir -p "release-assets" "$name"
203203
cp -a next/ui/apps/desktop/release/linux-unpacked "$name/WePush Next"

‎next/distribution/src/main/distribution/install/windows/restore.ps1‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ try {
3131
$manifestedFiles = [Collections.Generic.HashSet[string]]::new([StringComparer]::Ordinal)
3232
$temporaryRoot = [IO.Path]::GetFullPath($temporary).TrimEnd('\')
3333
foreach ($line in Get-Content "$temporary\SHA256SUMS") {
34-
if ($line -notmatch '^([0-9a-f]{64}) (payload/data/.+)$') { throw "Invalid backup checksum manifest" }
35-
$expectedDigest = $Matches[1]
36-
$relative = $Matches[2]
34+
$line = $line.TrimStart([char]0xfeff)
35+
if ($line.Length -lt 67 -or $line.Substring(64, 2) -ne " ") { throw "Invalid backup checksum manifest line" }
36+
$expectedDigest = $line.Substring(0, 64)
37+
$relative = $line.Substring(66)
38+
if ($expectedDigest -notmatch '^[0-9a-f]{64}$' -or
39+
-not $relative.StartsWith("payload/data/", [StringComparison]::Ordinal)) {
40+
throw "Invalid backup checksum manifest line: $line"
41+
}
3742
if ($relative.Contains("\") -or $relative -match '(^|/)\.\.(/|$)' -or -not $manifestedFiles.Add($relative)) {
3843
throw "Unsafe or duplicate backup checksum path: $relative"
3944
}

0 commit comments

Comments
 (0)