diff --git a/CHANGELOG.md b/CHANGELOG.md index dc77d749f..36612b4af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ What's new in ps5upload, written for humans. ## Unreleased +**Downloads from your servers** +- **An FTP download that drops mid-file picks up where it stopped.** If the connection to the server was cut partway through a file, the copy failed with "ended early on the server" (or a stream to the PS5 failed with "short remote read") instead of carrying on. It now signs in again and continues from that byte. +- **Stopping a server-folder copy while its file list is still loading stops right away.** It used to sign in to the server again first, which held up the stop on a slow or sleeping server and could end with a sign-in error instead of "cancelled". +- Stop also takes effect between empty files, and a server that reports impossible file sizes can no longer crash the size count. + +**Security** +- The SSH library used for SFTP servers is updated to the release that fixes a known timing weakness in RSA (RUSTSEC-2023-0071), and a cookie library to its fixed release. + +## 12.6.24 + **Play Together** - **"Press PS, then pick Quick Play on the TV" no longer stays over a friend's game (#916).** The app only learns that a friend picked a user when it sees PS and then ✕, so a pick made any other way left that hint, and the buttons with it, on top of the picture in full screen for the whole session. It now holds the screen for 30 seconds at most, then hides like the other buttons. diff --git a/VERSION b/VERSION index d112d535b..4c541a053 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.6.23 +12.6.24 diff --git a/client/package-lock.json b/client/package-lock.json index 68f9da8ec..e81e74e4f 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "ps5upload-client", - "version": "12.6.23", + "version": "12.6.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ps5upload-client", - "version": "12.6.23", + "version": "12.6.24", "dependencies": { "@tauri-apps/api": "^2.12.5", "@tauri-apps/plugin-dialog": "^2.8.4", diff --git a/client/package.json b/client/package.json index 26e5f1108..801195cd9 100644 --- a/client/package.json +++ b/client/package.json @@ -2,7 +2,7 @@ "name": "ps5upload-client", "private": true, "type": "module", - "version": "12.6.23", + "version": "12.6.24", "description": "The all-in-one PS5 companion app.", "homepage": "https://github.com/phantomptr/ps5upload", "author": "PhantomPtr ", diff --git a/client/src-tauri/Cargo.lock b/client/src-tauri/Cargo.lock index 17211a85a..b6a0ef2be 100644 --- a/client/src-tauri/Cargo.lock +++ b/client/src-tauri/Cargo.lock @@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common 0.1.7", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -224,9 +224,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" dependencies = [ "async-task", "concurrent-queue", @@ -249,7 +249,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.4", + "rustix 1.1.6", "slab", "windows-sys 0.61.2", ] @@ -280,7 +280,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.4", + "rustix 1.1.6", ] [[package]] @@ -306,7 +306,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.4", + "rustix 1.1.6", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -609,7 +609,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -1066,9 +1066,9 @@ checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] name = "cookie" -version = "0.18.1" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" dependencies = [ "time", "version_check", @@ -1275,9 +1275,9 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-bigint" -version = "0.7.7" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc907c45bb7e9ef8fc3778defd0f3cd8c81288f1b4e748eba064948f20c47122" +checksum = "914c195c4d7fbc5ed7f88d14cbf85914d5c664967658d43404b263913a477e82" dependencies = [ "cpubits", "ctutils", @@ -1296,7 +1296,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array 0.14.7", + "generic-array", "typenum", ] @@ -1341,7 +1341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" dependencies = [ "quote", - "syn 3.0.3", + "syn 2.0.119", ] [[package]] @@ -1370,9 +1370,9 @@ dependencies = [ [[package]] name = "ctutils" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d28fb6aa7dd680b3ffd1a3e64e115c177bdba63c0ae7f9cd48129ff05c4fa0" +checksum = "261af4dc7a06ea8a527a8717d8cbba3417530d6ea14e1edb3de6b67806be474f" dependencies = [ "cmov", "subtle", @@ -1609,6 +1609,7 @@ dependencies = [ "const-oid", "crypto-common 0.2.2", "ctutils", + "zeroize", ] [[package]] @@ -1954,7 +1955,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2342,16 +2343,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "generic-array" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "337d46834ee672ab3e48caca2cb0c78cc174fb12b3a68d0d88f99a0519a5e36e" -dependencies = [ - "rustversion", - "typenum", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -2846,7 +2837,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core 0.58.0", ] [[package]] @@ -3073,7 +3064,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -4493,9 +4484,9 @@ dependencies = [ [[package]] name = "pkcs1" -version = "0.8.0-rc.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +checksum = "6250dd7321adbe93d12b750aee0ced159fd13e77f625edcdf1cb6f83cd99f650" dependencies = [ "der", "spki", @@ -4572,7 +4563,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.4", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -4752,7 +4743,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.23" +version = "12.6.24" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4761,14 +4752,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.23" +version = "12.6.24" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.23" +version = "12.6.24" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -4777,7 +4768,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.23" +version = "12.6.24" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -4786,7 +4777,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.23" +version = "12.6.24" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -4797,7 +4788,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "crc32fast", @@ -4807,7 +4798,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -4826,7 +4817,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.23" +version = "12.6.24" dependencies = [ "blake3", "libc", @@ -4843,7 +4834,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4877,7 +4868,7 @@ dependencies = [ [[package]] name = "ps5upload-desktop" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -4918,7 +4909,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.2", "aes-gcm 0.11.0", @@ -4982,7 +4973,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.2", "crc32fast", @@ -5005,7 +4996,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.23" +version = "12.6.24" dependencies = [ "axum", "base64 0.23.1", @@ -5019,7 +5010,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.2", "blake3", @@ -5031,7 +5022,7 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.23" +version = "12.6.24" dependencies = [ "cc", ] @@ -5110,7 +5101,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5430,14 +5421,16 @@ dependencies = [ [[package]] name = "rsa" -version = "0.10.0-rc.18" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" +checksum = "23e77fd77e0dea28b3011fd62d15445b7de7959333b0276d930e03be0f755699" dependencies = [ "const-oid", "crypto-bigint", + "crypto-common 0.2.2", "crypto-primes", "digest 0.11.3", + "hmac", "pkcs1", "pkcs8", "rand_core 0.10.1", @@ -5449,9 +5442,9 @@ dependencies = [ [[package]] name = "russh" -version = "0.65.1" +version = "0.65.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94be3d86c71b9ed220a675c405e35c7a02565a009bf8da2e9cc13a700320a5c5" +checksum = "569d8c45e20c123af2fc5ecb4803fde0a98572449ba4c24ed97741d7b02fedf7" dependencies = [ "aes 0.9.2", "bitflags 2.13.1", @@ -5473,7 +5466,6 @@ dependencies = [ "enum_dispatch", "flate2", "futures", - "generic-array 1.4.5", "getrandom 0.4.3", "ghash 0.6.0", "hex-literal", @@ -5612,20 +5604,20 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] name = "rustix" -version = "1.1.4" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.1", "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6295,9 +6287,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f" +checksum = "7ef958a98b9d5da290cfc78946e9f3e61e1e62a18db0d92cac0b83cc161491a9" dependencies = [ "base64ct", "der", @@ -6344,9 +6336,9 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.7.0-rc.11" +version = "0.7.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" +checksum = "0701b552e6bd8f13a6e07bde25307c32d7daad80a79b65832d110c0416e7b638" dependencies = [ "argon2", "bcrypt-pbkdf", @@ -7002,10 +6994,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", - "rustix 1.1.4", - "windows-sys 0.61.2", + "rustix 1.1.6", + "windows-sys 0.52.0", ] [[package]] @@ -7949,7 +7941,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -8684,7 +8676,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.4", + "rustix 1.1.6", "serde", "serde_repr", "tracing", diff --git a/client/src-tauri/Cargo.toml b/client/src-tauri/Cargo.toml index 7ba608941..e049ffafe 100644 --- a/client/src-tauri/Cargo.toml +++ b/client/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ps5upload-desktop" -version = "12.6.23" +version = "12.6.24" description = "The all-in-one PS5 companion app." license = "GPL-3.0-or-later" edition = "2021" diff --git a/client/src-tauri/tauri.conf.json b/client/src-tauri/tauri.conf.json index 33d13a558..390f14945 100644 --- a/client/src-tauri/tauri.conf.json +++ b/client/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "PS5Upload", - "version": "12.6.23", + "version": "12.6.24", "identifier": "com.phantomptr.ps5upload", "build": { "beforeDevCommand": "npm run dev:vite", diff --git a/engine/Cargo.lock b/engine/Cargo.lock index 9375cb8e6..e4bc56182 100644 --- a/engine/Cargo.lock +++ b/engine/Cargo.lock @@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common 0.1.7", - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -368,7 +368,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -718,9 +718,9 @@ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crypto-bigint" -version = "0.7.7" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc907c45bb7e9ef8fc3778defd0f3cd8c81288f1b4e748eba064948f20c47122" +checksum = "914c195c4d7fbc5ed7f88d14cbf85914d5c664967658d43404b263913a477e82" dependencies = [ "cpubits", "ctutils", @@ -739,7 +739,7 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array 0.14.7", + "generic-array", "typenum", ] @@ -784,9 +784,9 @@ dependencies = [ [[package]] name = "ctutils" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d28fb6aa7dd680b3ffd1a3e64e115c177bdba63c0ae7f9cd48129ff05c4fa0" +checksum = "261af4dc7a06ea8a527a8717d8cbba3417530d6ea14e1edb3de6b67806be474f" dependencies = [ "cmov", "subtle", @@ -948,6 +948,7 @@ dependencies = [ "const-oid", "crypto-common 0.2.2", "ctutils", + "zeroize", ] [[package]] @@ -1292,16 +1293,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "generic-array" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "337d46834ee672ab3e48caca2cb0c78cc174fb12b3a68d0d88f99a0519a5e36e" -dependencies = [ - "rustversion", - "typenum", -] - [[package]] name = "getrandom" version = "0.2.17" @@ -1754,7 +1745,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "generic-array 0.14.7", + "generic-array", ] [[package]] @@ -2391,9 +2382,9 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pkcs1" -version = "0.8.0-rc.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e" +checksum = "6250dd7321adbe93d12b750aee0ced159fd13e77f625edcdf1cb6f83cd99f650" dependencies = [ "der", "spki", @@ -2570,7 +2561,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-exfat" -version = "12.6.23" +version = "12.6.24" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2579,14 +2570,14 @@ dependencies = [ [[package]] name = "ps5-dump-forge-patch" -version = "12.6.23" +version = "12.6.24" dependencies = [ "crc32fast", ] [[package]] name = "ps5-dump-forge-pfs" -version = "12.6.23" +version = "12.6.24" dependencies = [ "flate2", "ps5-dump-forge-patch", @@ -2596,7 +2587,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-ufs2" -version = "12.6.23" +version = "12.6.24" dependencies = [ "ps5-dump-forge-patch", "ps5upload-fpkg", @@ -2606,7 +2597,7 @@ dependencies = [ [[package]] name = "ps5-dump-forge-zstd" -version = "12.6.23" +version = "12.6.24" dependencies = [ "crc32fast", "getrandom 0.4.3", @@ -2617,7 +2608,7 @@ dependencies = [ [[package]] name = "ps5upload-apidoc" -version = "12.6.23" +version = "12.6.24" dependencies = [ "proc-macro2", "quote", @@ -2627,7 +2618,7 @@ dependencies = [ [[package]] name = "ps5upload-archive" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "crc32fast", @@ -2637,7 +2628,7 @@ dependencies = [ [[package]] name = "ps5upload-ava1" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -2660,7 +2651,7 @@ dependencies = [ [[package]] name = "ps5upload-convert" -version = "12.6.23" +version = "12.6.24" dependencies = [ "libc", "ps5upload-archive", @@ -2675,7 +2666,7 @@ dependencies = [ [[package]] name = "ps5upload-convert-core" -version = "12.6.23" +version = "12.6.24" dependencies = [ "blake3", "flate2", @@ -2695,7 +2686,7 @@ dependencies = [ [[package]] name = "ps5upload-core" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2729,7 +2720,7 @@ dependencies = [ [[package]] name = "ps5upload-ctest" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -2745,7 +2736,7 @@ dependencies = [ [[package]] name = "ps5upload-engine" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.4", "aes-gcm 0.11.1", @@ -2813,7 +2804,7 @@ dependencies = [ [[package]] name = "ps5upload-fpkg" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.4", "blake3", @@ -2837,7 +2828,7 @@ dependencies = [ [[package]] name = "ps5upload-hub" -version = "12.6.23" +version = "12.6.24" dependencies = [ "axum", "base64 0.23.1", @@ -2852,7 +2843,7 @@ dependencies = [ [[package]] name = "ps5upload-lab" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -2870,7 +2861,7 @@ dependencies = [ [[package]] name = "ps5upload-pkg" -version = "12.6.23" +version = "12.6.24" dependencies = [ "aes 0.9.4", "blake3", @@ -2882,14 +2873,14 @@ dependencies = [ [[package]] name = "ps5upload-tailnet" -version = "12.6.23" +version = "12.6.24" dependencies = [ "cc", ] [[package]] name = "ps5upload-tests" -version = "12.6.23" +version = "12.6.24" dependencies = [ "anyhow", "ava1", @@ -2907,7 +2898,7 @@ dependencies = [ [[package]] name = "ps5upload-unrar" -version = "12.6.23" +version = "12.6.24" dependencies = [ "serde", "serde_json", @@ -3090,14 +3081,16 @@ dependencies = [ [[package]] name = "rsa" -version = "0.10.0-rc.18" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b2aa4ba0d89f73d1e332df05be0eeab8840351c36ca5654341dfdb57bb3caf" +checksum = "23e77fd77e0dea28b3011fd62d15445b7de7959333b0276d930e03be0f755699" dependencies = [ "const-oid", "crypto-bigint", + "crypto-common 0.2.2", "crypto-primes", "digest 0.11.3", + "hmac", "pkcs1", "pkcs8", "rand_core 0.10.1", @@ -3109,9 +3102,9 @@ dependencies = [ [[package]] name = "russh" -version = "0.65.1" +version = "0.65.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94be3d86c71b9ed220a675c405e35c7a02565a009bf8da2e9cc13a700320a5c5" +checksum = "569d8c45e20c123af2fc5ecb4803fde0a98572449ba4c24ed97741d7b02fedf7" dependencies = [ "aes 0.9.4", "bitflags", @@ -3133,7 +3126,6 @@ dependencies = [ "enum_dispatch", "flate2", "futures", - "generic-array 1.4.5", "getrandom 0.4.3", "ghash 0.6.0", "hex-literal", @@ -3697,9 +3689,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f" +checksum = "7ef958a98b9d5da290cfc78946e9f3e61e1e62a18db0d92cac0b83cc161491a9" dependencies = [ "base64ct", "der", @@ -3746,9 +3738,9 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.7.0-rc.11" +version = "0.7.0-rc.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" +checksum = "0701b552e6bd8f13a6e07bde25307c32d7daad80a79b65832d110c0416e7b638" dependencies = [ "argon2", "bcrypt-pbkdf", diff --git a/engine/Cargo.toml b/engine/Cargo.toml index 718da15a7..163a96e1f 100644 --- a/engine/Cargo.toml +++ b/engine/Cargo.toml @@ -32,7 +32,7 @@ resolver = "2" [workspace.package] edition = "2021" license = "GPL-3.0-or-later" -version = "12.6.23" +version = "12.6.24" [workspace.dependencies] # AVA1 (github.com/phantomptr/ava1): the Rust crate from crates.io; the payload builds the C side diff --git a/engine/crates/ps5upload-engine/src/remote/fetch.rs b/engine/crates/ps5upload-engine/src/remote/fetch.rs index 9937f6cfd..e1c5e4c9b 100644 --- a/engine/crates/ps5upload-engine/src/remote/fetch.rs +++ b/engine/crates/ps5upload-engine/src/remote/fetch.rs @@ -624,6 +624,10 @@ async fn copy_all(job: CopyJob<'_>) -> Result<(u64, u64), String> { work.push((remote.clone(), local.clone(), entry)); } for (remote, local, entry) in work { + // Checked per file too: a folder of empty files never enters the read loop below. + if job.cancel.load(std::sync::atomic::Ordering::Relaxed) { + return Err("cancelled".into()); + } let file = job .pool .with_fs(&job.store, &job.id, |fs| { @@ -936,7 +940,10 @@ pub(crate) async fn inspect_folder(r: &Remote, remote: &str) -> Response { .map_err(|e| e.to_string())? .map_err(|e| format!("{e:#}"))?; inspected.path = remote.to_string(); - inspected.total_size = walked.iter().map(|(_, e)| e.size).sum(); + // Saturating: a server reporting absurd sizes must not panic the engine. + inspected.total_size = walked + .iter() + .fold(0u64, |t, (_, e)| t.saturating_add(e.size)); inspected.file_count = walked.len() as u64; inspected.skipped_paths = Vec::new(); Ok(json!({ "ok": true, "result": inspected, "wrapped_hint": null })) diff --git a/engine/crates/ps5upload-engine/src/remote/ftp_fs.rs b/engine/crates/ps5upload-engine/src/remote/ftp_fs.rs index f06df5454..22ea413d4 100644 --- a/engine/crates/ps5upload-engine/src/remote/ftp_fs.rs +++ b/engine/crates/ps5upload-engine/src/remote/ftp_fs.rs @@ -849,6 +849,10 @@ impl RemoteFile for FtpFile { if !matches!(tokio::time::timeout(STEP, stream.finish()).await, Ok(Ok(_))) { return Ok(out); } + } else if (got as u64) < len { + // The data connection ended before the file did (dropped by the server or a router): + // it has nothing more to give, so the next read starts a fresh transfer from `at`. + return Ok(out); } else { s.open = Some((stream, self.path.clone(), at)); } @@ -1612,6 +1616,103 @@ mod tests { drop(held); } + /// A server whose first RETR sends only the first `cut` bytes of `body` and closes the data + /// connection (a NAS or router dropping it mid-file); every later RETR (with REST) is whole. + async fn dropping_server(body: &'static [u8], cut: usize) -> u16 { + use std::sync::atomic::{AtomicUsize, Ordering}; + use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; + let ctl = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); + let port = ctl.local_addr().unwrap().port(); + let retrs = Arc::new(AtomicUsize::new(0)); + tokio::spawn(async move { + while let Ok((sock, _)) = ctl.accept().await { + let retrs = Arc::clone(&retrs); + tokio::spawn(async move { + let (rd, mut wr) = sock.into_split(); + let mut rd = BufReader::new(rd); + let mut data: Option = None; + let mut rest = 0usize; + wr.write_all(b"220 ready\r\n").await.ok(); + let mut line = String::new(); + while matches!(rd.read_line(&mut line).await, Ok(n) if n > 0) { + let l = line.trim_end_matches(['\r', '\n']).to_string(); + line.clear(); + let (cmd, arg) = l.split_once(' ').unwrap_or((l.as_str(), "")); + let reply = match cmd.to_ascii_uppercase().as_str() { + "USER" => "331 Password required".to_string(), + "PASS" => "230 OK".into(), + "TYPE" => "200 OK".into(), + "PWD" => "257 \"/\" is the current folder".into(), + "SIZE" => format!("213 {}", body.len()), + "REST" => { + rest = arg.parse().unwrap(); + "350 Restarting".into() + } + "PASV" => { + let l = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); + let p = l.local_addr().unwrap().port(); + data = Some(l); + format!( + "227 Entering Passive Mode (127,0,0,1,{},{})", + p / 256, + p % 256 + ) + } + "RETR" => { + let Some(l) = data.take() else { + wr.write_all(b"425 No data connection\r\n").await.ok(); + continue; + }; + wr.write_all(b"150 Opening data connection\r\n").await.ok(); + let (mut d, _) = l.accept().await.unwrap(); + let first = retrs.fetch_add(1, Ordering::SeqCst) == 0; + let end = if first { cut } else { body.len() }; + d.write_all(&body[rest.min(end)..end]).await.ok(); + drop(d); + rest = 0; + if first { + "426 Connection closed; transfer aborted".into() + } else { + "226 Transfer complete".into() + } + } + "QUIT" => { + wr.write_all(b"221 Goodbye\r\n").await.ok(); + break; + } + _ => "500 Unknown command".into(), + }; + wr.write_all(format!("{reply}\r\n").as_bytes()).await.ok(); + } + }); + } + }); + port + } + + /// A data connection the server dropped part way gave a short read, and was then kept to + /// read on from: every later read of the file came back empty, and a copy failed with the + /// file "ended early" where a fresh transfer from that byte would have finished it. + #[tokio::test] + async fn a_transfer_cut_short_is_not_read_on_from() { + static BODY: &[u8] = b"0123456789abcdefghijklmnopqrstuvwxyz"; + let port = dropping_server(BODY, 10).await; + let mut conn = crate::remote::store::conn("t", crate::remote::store::Protocol::Ftp); + conn.host = "127.0.0.1".into(); + conn.port = port; + conn.user = "t".into(); + let secret = Secret::Password { + password: "t".into(), + }; + let fs = FtpFs::connect(&conn, &secret, false).await.unwrap(); + let f = fs.open("/f.bin").await.unwrap(); + assert_eq!(f.size(), BODY.len() as u64); + let first = f.read_at(0, BODY.len() as u64).await.unwrap(); + assert_eq!(first, &BODY[..10]); + let rest = f.read_at(10, BODY.len() as u64 - 10).await.unwrap(); + assert_eq!(rest, &BODY[10..], "the rest of the file came back empty"); + } + /// The same against a real Pure-FTPd: in ``, make the report's folder /// ([`GLOB_DIR`]) holding a sparse [`GLOB_FILE`] of [`GLOB_SIZE`] bytes (`truncate -s`), then /// `docker run -d -p 2122:21 -p 30000-30009:30000-30009 -v :/home/t alpine:3.20 sh -c diff --git a/engine/crates/ps5upload-engine/src/remote/pool.rs b/engine/crates/ps5upload-engine/src/remote/pool.rs index 1865a1364..2c5d707da 100644 --- a/engine/crates/ps5upload-engine/src/remote/pool.rs +++ b/engine/crates/ps5upload-engine/src/remote/pool.rs @@ -147,7 +147,8 @@ impl Pool { { let fs = self.fs(store, id).await?; match f(fs).await { - Err(e) if is_transient(&e) => { + // A stop the user asked for reads like a lost connection; it is neither. + Err(e) if is_transient(&e) && e.to_string() != "cancelled" => { self.invalidate(id); let fs = self.fs(store, id).await?; f(fs).await @@ -524,6 +525,32 @@ mod tests { )); } + /// A walk the user stopped is not a dropped connection: the session stays, and the server + /// is not signed in to again after the cancel. + #[tokio::test] + async fn a_cancelled_walk_does_not_sign_in_again() { + let r = remote_with(MemFs::new(&[("/g/a", b"x")]), None); + let id = r + .store + .add(conn("NAS", Protocol::Smb), Secret::None) + .unwrap() + .conn + .id; + let stop = std::sync::atomic::AtomicBool::new(true); + let e = r + .pool + .with_fs(&r.store, &id, |fs| { + let stop = &stop; + async move { fs.walk_until("/g", 10, stop).await } + }) + .await + .unwrap_err(); + assert_eq!(e.to_string(), "cancelled"); + assert_eq!(r.pool.connects(), 1); + r.pool.fs(&r.store, &id).await.unwrap(); + assert_eq!(r.pool.connects(), 1, "the session was thrown away"); + } + #[tokio::test] async fn a_retrying_file_survives_dropped_reads_but_not_a_lost_server() { let mem = Arc::new(MemFs::new(&[("/a", b"hello")])); diff --git a/payload/include/config.h b/payload/include/config.h index a06dff23c..3e449f1ea 100644 --- a/payload/include/config.h +++ b/payload/include/config.h @@ -5,7 +5,7 @@ * UI tell apart an old payload still running from a build that includes * a particular fix, without having to boot the console. Keep in sync * with the desktop app's package.json during releases. */ -#define PS5UPLOAD2_VERSION "12.6.23" +#define PS5UPLOAD2_VERSION "12.6.24" /* Author credit — embedded in the startup toast so anyone looking at * the console screen knows who wrote the software that just loaded. * Kept separate from VERSION so release scripts can bump the version diff --git a/scripts/security-scan.sh b/scripts/security-scan.sh index 7e857e08b..4a53ea397 100755 --- a/scripts/security-scan.sh +++ b/scripts/security-scan.sh @@ -11,9 +11,6 @@ # (CI=true), so the workflow can never pass by not running a check. # # Accepted findings live here, each with its reason, so a new one fails the scan: -# RUSTSEC-2023-0071 rsa: Marvin timing attack. No fixed release exists. Pulled in by -# russh for SFTP sources; we only sign with a local key, never decrypt -# attacker-chosen ciphertext over the network. # Gitleaks false positives (AES test vectors, a test archive password, the old Wake # example key) are listed by fingerprint in .gitleaksignore. @@ -45,7 +42,7 @@ if cargo audit --version >/dev/null 2>&1; then echo "-- $dir" # Warnings (unmaintained, unsound, yanked) are printed but do not fail: they are # mostly Linux GTK crates under Tauri that we cannot change. Vulnerabilities fail. - if ! (cd "$dir" && cargo audit --ignore RUSTSEC-2023-0071); then + if ! (cd "$dir" && cargo audit); then failed+=("cargo audit ($dir)") fi done