Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix(deps): upgrade zip to 9 and calamine to 0.37 (#9503)

Thinh Lecc5ac705246b
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index cf8f4ec57..a263f6431 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -28,7 +28,7 @@ dependencies = [
"glob",
"gtk",
"hex",
- "hmac",
+ "hmac 0.12.1",
"hostname",
"http-body-util",
"hyper",
@@ -57,7 +57,7 @@ dependencies = [
"serde",
"serde_json",
"serde_yaml",
- "sha2",
+ "sha2 0.10.9",
"sqlx",
"syntect",
"sysinfo",
@@ -95,7 +95,7 @@ dependencies = [
"uuid",
"windows-sys 0.60.2",
"zbus 5.17.0",
- "zip 0.6.6",
+ "zip 9.1.3",
]
[[package]]
@@ -119,7 +119,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
- "crypto-common",
+ "crypto-common 0.1.7",
"generic-array",
]
@@ -130,10 +130,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
dependencies = [
"cfg-if",
- "cipher",
+ "cipher 0.4.4",
"cpufeatures 0.2.17",
]
+[[package]]
+name = "aes"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32"
+dependencies = [
+ "cipher 0.5.2",
+ "cpubits",
+ "cpufeatures 0.3.0",
+ "zeroize",
+]
+
[[package]]
name = "aes-gcm"
version = "0.10.3"
@@ -141,8 +153,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
dependencies = [
"aead",
- "aes",
- "cipher",
+ "aes 0.8.4",
+ "cipher 0.4.4",
"ctr",
"ghash",
"subtle",
@@ -578,6 +590,16 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "atoi_simd"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44"
+dependencies = [
+ "debug_unsafe",
+ "rustversion",
+]
+
[[package]]
name = "atomic"
version = "0.6.1"
@@ -761,6 +783,16 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "block-buffer"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
+dependencies = [
+ "hybrid-array",
+ "zeroize",
+]
+
[[package]]
name = "block-padding"
version = "0.3.3"
@@ -887,22 +919,11 @@ dependencies = [
[[package]]
name = "bzip2"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
-dependencies = [
- "bzip2-sys",
- "libc",
-]
-
-[[package]]
-name = "bzip2-sys"
-version = "0.1.13+1.0.8"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"
dependencies = [
- "cc",
- "pkg-config",
+ "libbz2-rs-sys",
]
[[package]]
@@ -932,17 +953,19 @@ dependencies = [
[[package]]
name = "calamine"
-version = "0.23.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47a4d6ea525ea187df1e3a1c4b23469b1cbe60c5bafc1c0ef14b2b8738a8303d"
+checksum = "c9ca341b94bc4b29e08970b1a03914fad2dfe177e2ecb67fcd6de9046004aafb"
dependencies = [
+ "atoi_simd",
"byteorder",
"codepage",
"encoding_rs",
+ "fast-float2",
"log",
- "quick-xml 0.31.0",
+ "quick-xml 0.42.0",
"serde",
- "zip 0.6.6",
+ "zip 9.1.3",
]
[[package]]
@@ -1002,7 +1025,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
]
[[package]]
@@ -1114,8 +1137,18 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
- "crypto-common",
- "inout",
+ "crypto-common 0.1.7",
+ "inout 0.1.4",
+]
+
+[[package]]
+name = "cipher"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
+dependencies = [
+ "crypto-common 0.2.2",
+ "inout 0.2.5",
]
[[package]]
@@ -1176,6 +1209,12 @@ dependencies = [
"cc",
]
+[[package]]
+name = "cmov"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
+
[[package]]
name = "codepage"
version = "0.1.2"
@@ -1270,6 +1309,12 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+[[package]]
+name = "const-oid"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
+
[[package]]
name = "const-random"
version = "0.1.18"
@@ -1292,9 +1337,12 @@ dependencies = [
[[package]]
name = "constant_time_eq"
-version = "0.1.5"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
+dependencies = [
+ "rustversion",
+]
[[package]]
name = "convert_case"
@@ -1395,6 +1443,12 @@ dependencies = [
"libc",
]
+[[package]]
+name = "cpubits"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae"
+
[[package]]
name = "cpufeatures"
version = "0.2.17"
@@ -1530,6 +1584,15 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "crypto-common"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "csscolorparser"
version = "0.6.2"
@@ -1606,7 +1669,16 @@ version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
+]
+
+[[package]]
+name = "ctutils"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a"
+dependencies = [
+ "cmov",
]
[[package]]
@@ -1618,7 +1690,7 @@ dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
"curve25519-dalek-derive",
- "digest",
+ "digest 0.10.7",
"fiat-crypto",
"rustc_version",
"subtle",
@@ -1775,7 +1847,7 @@ version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "708b509edf7889e53d7efb0ffadd994cc6c2345ccb62f55cfd6b0682165e4fa6"
dependencies = [
- "aes",
+ "aes 0.8.4",
"block-padding",
"cbc",
"dbus",
@@ -1783,10 +1855,22 @@ dependencies = [
"hkdf",
"num",
"once_cell",
- "sha2",
+ "sha2 0.10.9",
"zeroize",
]
+[[package]]
+name = "debug_unsafe"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2"
+
+[[package]]
+name = "deflate64"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2"
+
[[package]]
name = "defmt"
version = "1.1.1"
@@ -1830,7 +1914,7 @@ version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
dependencies = [
- "const-oid",
+ "const-oid 0.9.6",
"pem-rfc7468",
"zeroize",
]
@@ -1884,12 +1968,25 @@ version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
- "block-buffer",
- "const-oid",
- "crypto-common",
+ "block-buffer 0.10.4",
+ "const-oid 0.9.6",
+ "crypto-common 0.1.7",
"subtle",
]
+[[package]]
+name = "digest"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
+dependencies = [
+ "block-buffer 0.12.1",
+ "const-oid 0.10.2",
+ "crypto-common 0.2.2",
+ "ctutils",
+ "zeroize",
+]
+
[[package]]
name = "dirs"
version = "6.0.0"
@@ -2068,7 +2165,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
]
[[package]]
@@ -2091,7 +2188,7 @@ dependencies = [
"ed25519",
"rand_core 0.6.4",
"serde",
- "sha2",
+ "sha2 0.10.9",
"subtle",
"zeroize",
]
@@ -2336,6 +2433,12 @@ dependencies = [
"regex-syntax",
]
+[[package]]
+name = "fast-float2"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f"
+
[[package]]
name = "fast-srgb8"
version = "1.0.0"
@@ -2451,6 +2554,7 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
+ "zlib-rs",
]
[[package]]
@@ -3245,7 +3349,7 @@ version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
dependencies = [
- "hmac",
+ "hmac 0.12.1",
]
[[package]]
@@ -3254,7 +3358,16 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "hmac"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f"
+dependencies = [
+ "digest 0.11.3",
]
[[package]]
@@ -3367,6 +3480,15 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+[[package]]
+name = "hybrid-array"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
+dependencies = [
+ "typenum",
+]
+
[[package]]
name = "hyper"
version = "1.10.1"
@@ -3692,6 +3814,15 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "inout"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b5cf4372d022092674a83b8febf5865f7a573cc0c5baec5e49c879b6a20978f"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "insta"
version = "1.49.0"
@@ -3767,12 +3898,12 @@ name = "jan-utils"
version = "0.1.0"
dependencies = [
"base64 0.22.1",
- "hmac",
+ "hmac 0.12.1",
"rand 0.8.7",
"reqwest 0.12.28",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"tokio",
"tokio-util",
"url",
@@ -4034,6 +4165,12 @@ dependencies = [
"once_cell",
]
+[[package]]
+name = "libbz2-rs-sys"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f454fd6831a29c0e827ed075bca2a15be201bd57f4168f0fd1041124eab17e"
+
[[package]]
name = "libc"
version = "0.2.186"
@@ -4146,7 +4283,7 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c"
dependencies = [
- "aes",
+ "aes 0.8.4",
"bitflags 2.13.0",
"cbc",
"ecb",
@@ -4160,7 +4297,7 @@ dependencies = [
"nom 8.0.0",
"rand 0.10.2",
"rangemap",
- "sha2",
+ "sha2 0.10.9",
"stringprep",
"thiserror 2.0.18",
"ttf-parser",
@@ -4182,6 +4319,15 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
+[[package]]
+name = "lzma-rust2"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1c46f3fcd2e888afdb01a07efc071cb21300e07c68d32c3e8b01b5c8cb1fcaa"
+dependencies = [
+ "sha2 0.11.1",
+]
+
[[package]]
name = "mac"
version = "0.1.1"
@@ -4272,7 +4418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
"cfg-if",
- "digest",
+ "digest 0.10.7",
]
[[package]]
@@ -4679,7 +4825,7 @@ dependencies = [
"serde",
"serde_json",
"serde_path_to_error",
- "sha2",
+ "sha2 0.10.9",
"thiserror 1.0.69",
"url",
]
@@ -5171,17 +5317,6 @@ dependencies = [
"windows-link 0.2.1",
]
-[[package]]
-name = "password-hash"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
-dependencies = [
- "base64ct",
- "rand_core 0.6.4",
- "subtle",
-]
-
[[package]]
name = "paste"
version = "1.0.15"
@@ -5196,14 +5331,12 @@ checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
[[package]]
name = "pbkdf2"
-version = "0.11.0"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629"
dependencies = [
- "digest",
- "hmac",
- "password-hash",
- "sha2",
+ "digest 0.11.3",
+ "hmac 0.13.0",
]
[[package]]
@@ -5617,6 +5750,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+[[package]]
+name = "ppmd-rust"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd4acc8d264ea385db64ccfdcdfd5909ee9eda0975666723d59f3bfec80b3611"
+
[[package]]
name = "ppv-lite86"
version = "0.2.21"
@@ -5753,7 +5892,6 @@ version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
dependencies = [
- "encoding_rs",
"memchr",
"serde",
]
@@ -5776,6 +5914,16 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "quick-xml"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
+dependencies = [
+ "encoding_rs",
+ "memchr",
+]
+
[[package]]
name = "quinn"
version = "0.11.11"
@@ -6346,8 +6494,8 @@ version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d"
dependencies = [
- "const-oid",
- "digest",
+ "const-oid 0.9.6",
+ "digest 0.10.7",
"num-bigint-dig",
"num-integer",
"num-traits",
@@ -6621,7 +6769,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4d35ad99a181be0a60ffcbe85d680d98f87bdc4d7644ade319b87076b9dbfd4"
dependencies = [
- "aes",
+ "aes 0.8.4",
"cbc",
"futures-util",
"generic-array",
@@ -6630,7 +6778,7 @@ dependencies = [
"once_cell",
"rand 0.8.7",
"serde",
- "sha2",
+ "sha2 0.10.9",
"zbus 4.4.0",
]
@@ -6902,7 +7050,18 @@ checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8"
dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha1"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.0",
+ "digest 0.11.3",
]
[[package]]
@@ -6913,7 +7072,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.0",
+ "digest 0.11.3",
]
[[package]]
@@ -6987,7 +7157,7 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
- "digest",
+ "digest 0.10.7",
"rand_core 0.6.4",
]
@@ -7161,7 +7331,7 @@ dependencies = [
"percent-encoding",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"smallvec",
"thiserror 2.0.18",
"tokio",
@@ -7198,7 +7368,7 @@ dependencies = [
"quote",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"sqlx-core",
"sqlx-mysql",
"sqlx-postgres",
@@ -7220,7 +7390,7 @@ dependencies = [
"byteorder",
"bytes",
"crc",
- "digest",
+ "digest 0.10.7",
"dotenvy",
"either",
"futures-channel",
@@ -7230,7 +7400,7 @@ dependencies = [
"generic-array",
"hex",
"hkdf",
- "hmac",
+ "hmac 0.12.1",
"itoa",
"log",
"md-5",
@@ -7240,8 +7410,8 @@ dependencies = [
"rand 0.8.7",
"rsa",
"serde",
- "sha1",
- "sha2",
+ "sha1 0.10.7",
+ "sha2 0.10.9",
"smallvec",
"sqlx-core",
"stringprep",
@@ -7268,7 +7438,7 @@ dependencies = [
"futures-util",
"hex",
"hkdf",
- "hmac",
+ "hmac 0.12.1",
"home",
"itoa",
"log",
@@ -7278,7 +7448,7 @@ dependencies = [
"rand 0.8.7",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"smallvec",
"sqlx-core",
"stringprep",
@@ -7753,7 +7923,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"syn 2.0.118",
"tauri-utils",
"thiserror 2.0.18",
@@ -7942,7 +8112,7 @@ dependencies = [
"bytes",
"cc",
"futures-util",
- "hmac",
+ "hmac 0.12.1",
"http-body-util",
"hyper",
"hyper-util",
@@ -7954,7 +8124,7 @@ dependencies = [
"reqwest 0.12.28",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"tauri",
"tauri-plugin",
"tauri-plugin-hardware",
@@ -8058,7 +8228,7 @@ dependencies = [
"tauri-plugin",
"thiserror 2.0.18",
"tokio",
- "zip 0.6.6",
+ "zip 9.1.3",
]
[[package]]
@@ -8318,7 +8488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
- "getrandom 0.3.4",
+ "getrandom 0.4.3",
"once_cell",
"rustix",
"windows-sys 0.61.2",
@@ -8403,7 +8573,7 @@ dependencies = [
"pest",
"pest_derive",
"phf 0.11.3",
- "sha2",
+ "sha2 0.10.9",
"signal-hook",
"siphasher 1.0.3",
"terminfo",
@@ -8490,6 +8660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50"
dependencies = [
"deranged",
+ "js-sys",
"libc",
"num-conv",
"num_threads",
@@ -8892,6 +9063,12 @@ dependencies = [
"pom",
]
+[[package]]
+name = "typed-path"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
+
[[package]]
name = "typeid"
version = "1.0.3"
@@ -9036,7 +9213,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
- "crypto-common",
+ "crypto-common 0.1.7",
"subtle",
]
@@ -9580,7 +9757,7 @@ checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7"
dependencies = [
"getrandom 0.3.4",
"mac_address",
- "sha2",
+ "sha2 0.10.9",
"thiserror 1.0.69",
"uuid",
]
@@ -10379,7 +10556,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"raw-window-handle 0.6.2",
- "sha2",
+ "sha2 0.10.9",
"soup3",
"tao-macros",
"thiserror 2.0.18",
@@ -10518,7 +10695,7 @@ dependencies = [
"rand 0.8.7",
"serde",
"serde_repr",
- "sha1",
+ "sha1 0.10.7",
"static_assertions",
"tracing",
"uds_windows",
@@ -10711,66 +10888,92 @@ dependencies = [
[[package]]
name = "zip"
-version = "0.6.6"
+version = "4.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
+checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1"
dependencies = [
- "aes",
- "byteorder",
- "bzip2",
- "constant_time_eq",
+ "arbitrary",
"crc32fast",
- "crossbeam-utils",
- "flate2",
- "hmac",
- "pbkdf2",
- "sha1",
- "time",
- "zstd",
+ "indexmap 2.14.0",
+ "memchr",
]
[[package]]
name = "zip"
-version = "4.6.1"
+version = "9.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "caa8cd6af31c3b31c6631b8f483848b91589021b28fffe50adada48d4f4d2ed1"
+checksum = "1156b39d142a34b999c2310a50455e0cb3760bf7efad0122f796d813bee26ccb"
dependencies = [
- "arbitrary",
+ "aes 0.9.3",
+ "bzip2",
+ "constant_time_eq",
"crc32fast",
+ "deflate64",
+ "flate2",
+ "getrandom 0.4.3",
+ "hmac 0.13.0",
"indexmap 2.14.0",
+ "lzma-rust2",
"memchr",
+ "nix 0.31.3",
+ "pbkdf2",
+ "ppmd-rust",
+ "sha1 0.11.0",
+ "time",
+ "typed-path",
+ "windows-sys 0.61.2",
+ "zeroize",
+ "zopfli",
+ "zstd",
]
+[[package]]
+name = "zlib-rs"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
+
[[package]]
name = "zmij"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+[[package]]
+name = "zopfli"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "log",
+ "simd-adler32",
+]
+
[[package]]
name = "zstd"
-version = "0.11.2+zstd.1.5.2"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
+checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "5.0.2+zstd.1.5.2"
+version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
+checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
dependencies = [
- "libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.16+zstd.1.5.7"
+version = "2.1.2+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
+checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
dependencies = [
"cc",
"pkg-config",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index be17ad05e..b2f0feb02 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -159,7 +159,7 @@ toml = "0.8"
toml_edit = "0.23"
sha2 = "0.10"
tar = "0.4"
-zip = "0.6"
+zip = "9"
tauri-plugin-deep-link = { version = "2", optional = true }
tauri-plugin-wdio-webdriver = { version = "1.4", optional = true }
tauri-plugin-hardware = { path = "./plugins/tauri-plugin-hardware", optional = true }
diff --git a/src-tauri/jan-cli/Cargo.lock b/src-tauri/jan-cli/Cargo.lock
index 7298f953a..ec40a6216 100644
--- a/src-tauri/jan-cli/Cargo.lock
+++ b/src-tauri/jan-cli/Cargo.lock
@@ -26,7 +26,7 @@ dependencies = [
"genai",
"glob",
"hex",
- "hmac",
+ "hmac 0.12.1",
"hostname",
"http-body-util",
"hyper",
@@ -53,7 +53,7 @@ dependencies = [
"serde",
"serde_json",
"serde_yaml",
- "sha2",
+ "sha2 0.10.9",
"syntect",
"sysinfo",
"tar",
@@ -86,7 +86,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
- "crypto-common",
+ "crypto-common 0.1.7",
"generic-array",
]
@@ -97,10 +97,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
dependencies = [
"cfg-if",
- "cipher",
+ "cipher 0.4.4",
"cpufeatures 0.2.17",
]
+[[package]]
+name = "aes"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32"
+dependencies = [
+ "cipher 0.5.2",
+ "cpubits",
+ "cpufeatures 0.3.1",
+ "zeroize",
+]
+
[[package]]
name = "aes-gcm"
version = "0.10.3"
@@ -108,8 +120,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
dependencies = [
"aead",
- "aes",
- "cipher",
+ "aes 0.8.4",
+ "cipher 0.4.4",
"ctr",
"ghash",
"subtle",
@@ -569,6 +581,16 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "block-buffer"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
+dependencies = [
+ "hybrid-array",
+ "zeroize",
+]
+
[[package]]
name = "block-padding"
version = "0.3.3"
@@ -648,22 +670,11 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]]
name = "bzip2"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
-dependencies = [
- "bzip2-sys",
- "libc",
-]
-
-[[package]]
-name = "bzip2-sys"
-version = "0.1.13+1.0.8"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"
dependencies = [
- "cc",
- "pkg-config",
+ "libbz2-rs-sys",
]
[[package]]
@@ -713,7 +724,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
]
[[package]]
@@ -782,8 +793,18 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
- "crypto-common",
- "inout",
+ "crypto-common 0.1.7",
+ "inout 0.1.4",
+]
+
+[[package]]
+name = "cipher"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
+dependencies = [
+ "crypto-common 0.2.2",
+ "inout 0.2.5",
]
[[package]]
@@ -844,6 +865,12 @@ dependencies = [
"cc",
]
+[[package]]
+name = "cmov"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
+
[[package]]
name = "colorchoice"
version = "1.0.5"
@@ -929,11 +956,20 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+[[package]]
+name = "const-oid"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
+
[[package]]
name = "constant_time_eq"
-version = "0.1.5"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
+dependencies = [
+ "rustversion",
+]
[[package]]
name = "convert_case"
@@ -976,6 +1012,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"
+[[package]]
+name = "cpubits"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae"
+
[[package]]
name = "cpufeatures"
version = "0.2.17"
@@ -996,9 +1038,9 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.5.1"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8498c871161e1742aaa9d52551b2d6ebdd4c3d45a3be423e3728f33b955be550"
+checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
dependencies = [
"cfg-if",
]
@@ -1078,6 +1120,15 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "crypto-common"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "csscolorparser"
version = "0.6.2"
@@ -1133,7 +1184,16 @@ version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
+]
+
+[[package]]
+name = "ctutils"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a"
+dependencies = [
+ "cmov",
]
[[package]]
@@ -1145,7 +1205,7 @@ dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
"curve25519-dalek-derive",
- "digest",
+ "digest 0.10.7",
"fiat-crypto",
"rustc_version",
"subtle",
@@ -1214,7 +1274,7 @@ version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "708b509edf7889e53d7efb0ffadd994cc6c2345ccb62f55cfd6b0682165e4fa6"
dependencies = [
- "aes",
+ "aes 0.8.4",
"block-padding",
"cbc",
"dbus",
@@ -1222,10 +1282,16 @@ dependencies = [
"hkdf",
"num",
"once_cell",
- "sha2",
+ "sha2 0.10.9",
"zeroize",
]
+[[package]]
+name = "deflate64"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2"
+
[[package]]
name = "defmt"
version = "1.1.1"
@@ -1269,7 +1335,7 @@ version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
dependencies = [
- "const-oid",
+ "const-oid 0.9.6",
"zeroize",
]
@@ -1311,11 +1377,24 @@ version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
- "block-buffer",
- "crypto-common",
+ "block-buffer 0.10.4",
+ "crypto-common 0.1.7",
"subtle",
]
+[[package]]
+name = "digest"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
+dependencies = [
+ "block-buffer 0.12.1",
+ "const-oid 0.10.2",
+ "crypto-common 0.2.2",
+ "ctutils",
+ "zeroize",
+]
+
[[package]]
name = "dirs"
version = "6.0.0"
@@ -1450,7 +1529,7 @@ dependencies = [
"ed25519",
"rand_core 0.6.4",
"serde",
- "sha2",
+ "sha2 0.10.9",
"subtle",
"zeroize",
]
@@ -2116,7 +2195,7 @@ version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
dependencies = [
- "hmac",
+ "hmac 0.12.1",
]
[[package]]
@@ -2125,7 +2204,16 @@ version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "hmac"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f"
+dependencies = [
+ "digest 0.11.3",
]
[[package]]
@@ -2194,6 +2282,15 @@ version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
+[[package]]
+name = "hybrid-array"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
+dependencies = [
+ "typenum",
+]
+
[[package]]
name = "hyper"
version = "1.11.1"
@@ -2501,6 +2598,15 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "inout"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b5cf4372d022092674a83b8febf5865f7a573cc0c5baec5e49c879b6a20978f"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "instability"
version = "0.3.13"
@@ -2561,12 +2667,12 @@ name = "jan-utils"
version = "0.1.0"
dependencies = [
"base64 0.22.1",
- "hmac",
+ "hmac 0.12.1",
"rand 0.8.8",
"reqwest 0.12.28",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"tokio",
"tokio-util",
"url",
@@ -2758,6 +2864,12 @@ version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+[[package]]
+name = "libbz2-rs-sys"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f454fd6831a29c0e827ed075bca2a15be201bd57f4168f0fd1041124eab17e"
+
[[package]]
name = "libc"
version = "0.2.189"
@@ -2856,6 +2968,15 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
+[[package]]
+name = "lzma-rust2"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1c46f3fcd2e888afdb01a07efc071cb21300e07c68d32c3e8b01b5c8cb1fcaa"
+dependencies = [
+ "sha2 0.11.1",
+]
+
[[package]]
name = "mac_address"
version = "1.1.8"
@@ -3223,7 +3344,7 @@ dependencies = [
"serde",
"serde_json",
"serde_path_to_error",
- "sha2",
+ "sha2 0.10.9",
"thiserror 1.0.69",
"url",
]
@@ -3459,17 +3580,6 @@ dependencies = [
"windows-link",
]
-[[package]]
-name = "password-hash"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
-dependencies = [
- "base64ct",
- "rand_core 0.6.4",
- "subtle",
-]
-
[[package]]
name = "paste"
version = "1.0.15"
@@ -3484,14 +3594,12 @@ checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
[[package]]
name = "pbkdf2"
-version = "0.11.0"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629"
dependencies = [
- "digest",
- "hmac",
- "password-hash",
- "sha2",
+ "digest 0.11.3",
+ "hmac 0.13.0",
]
[[package]]
@@ -3806,6 +3914,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+[[package]]
+name = "ppmd-rust"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd4acc8d264ea385db64ccfdcdfd5909ee9eda0975666723d59f3bfec80b3611"
+
[[package]]
name = "ppv-lite86"
version = "0.2.21"
@@ -4580,7 +4694,7 @@ version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e4d35ad99a181be0a60ffcbe85d680d98f87bdc4d7644ade319b87076b9dbfd4"
dependencies = [
- "aes",
+ "aes 0.8.4",
"cbc",
"futures-util",
"generic-array",
@@ -4589,7 +4703,7 @@ dependencies = [
"once_cell",
"rand 0.8.8",
"serde",
- "sha2",
+ "sha2 0.10.9",
"zbus",
]
@@ -4851,7 +4965,18 @@ checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8"
dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha1"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.1",
+ "digest 0.11.3",
]
[[package]]
@@ -4862,7 +4987,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.1",
+ "digest 0.11.3",
]
[[package]]
@@ -5301,7 +5437,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
- "getrandom 0.3.4",
+ "getrandom 0.4.3",
"once_cell",
"rustix",
"windows-sys 0.61.2",
@@ -5375,7 +5511,7 @@ dependencies = [
"pest",
"pest_derive",
"phf 0.11.3",
- "sha2",
+ "sha2 0.10.9",
"signal-hook",
"siphasher",
"terminfo",
@@ -5453,6 +5589,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
dependencies = [
"deranged",
+ "js-sys",
"libc",
"num-conv",
"num_threads",
@@ -5788,6 +5925,12 @@ version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
+[[package]]
+name = "typed-path"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
+
[[package]]
name = "typeid"
version = "1.0.3"
@@ -5905,7 +6048,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
- "crypto-common",
+ "crypto-common 0.1.7",
"subtle",
]
@@ -6262,7 +6405,7 @@ checksum = "692daff6d93d94e29e4114544ef6d5c942a7ed998b37abdc19b17136ea428eb7"
dependencies = [
"getrandom 0.3.4",
"mac_address",
- "sha2",
+ "sha2 0.10.9",
"thiserror 1.0.69",
"uuid",
]
@@ -6821,7 +6964,7 @@ dependencies = [
"rand 0.8.8",
"serde",
"serde_repr",
- "sha1",
+ "sha1 0.10.7",
"static_assertions",
"tracing",
"uds_windows",
@@ -6952,21 +7095,30 @@ dependencies = [
[[package]]
name = "zip"
-version = "0.6.6"
+version = "9.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
+checksum = "1156b39d142a34b999c2310a50455e0cb3760bf7efad0122f796d813bee26ccb"
dependencies = [
- "aes",
- "byteorder",
+ "aes 0.9.3",
"bzip2",
"constant_time_eq",
"crc32fast",
- "crossbeam-utils",
+ "deflate64",
"flate2",
- "hmac",
+ "getrandom 0.4.3",
+ "hmac 0.13.0",
+ "indexmap 2.14.2",
+ "lzma-rust2",
+ "memchr",
+ "nix 0.31.3",
"pbkdf2",
- "sha1",
+ "ppmd-rust",
+ "sha1 0.11.0",
"time",
+ "typed-path",
+ "windows-sys 0.61.2",
+ "zeroize",
+ "zopfli",
"zstd",
]
@@ -6982,30 +7134,41 @@ version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+[[package]]
+name = "zopfli"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "log",
+ "simd-adler32",
+]
+
[[package]]
name = "zstd"
-version = "0.11.2+zstd.1.5.2"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
+checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "5.0.2+zstd.1.5.2"
+version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
+checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
dependencies = [
- "libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.1.0+zstd.1.5.7"
+version = "2.1.2+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ef0a8027ec3ee71300ab3bcbcd0393f434aa72b91ca6d635a39941deae8eea0"
+checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
dependencies = [
"cc",
"pkg-config",
diff --git a/src-tauri/plugins/tauri-plugin-rag/Cargo.lock b/src-tauri/plugins/tauri-plugin-rag/Cargo.lock
index ffffadcd6..e6c5f4c59 100644
--- a/src-tauri/plugins/tauri-plugin-rag/Cargo.lock
+++ b/src-tauri/plugins/tauri-plugin-rag/Cargo.lock
@@ -24,10 +24,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
dependencies = [
"cfg-if",
- "cipher",
+ "cipher 0.4.4",
"cpufeatures 0.2.17",
]
+[[package]]
+name = "aes"
+version = "0.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "35f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32"
+dependencies = [
+ "cipher 0.5.2",
+ "cpubits",
+ "cpufeatures 0.3.0",
+ "zeroize",
+]
+
[[package]]
name = "aho-corasick"
version = "1.1.4"
@@ -75,6 +87,16 @@ dependencies = [
"system-deps",
]
+[[package]]
+name = "atoi_simd"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44"
+dependencies = [
+ "debug_unsafe",
+ "rustversion",
+]
+
[[package]]
name = "atomic-waker"
version = "1.1.2"
@@ -99,12 +121,6 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
-[[package]]
-name = "base64ct"
-version = "1.8.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
-
[[package]]
name = "bit-set"
version = "0.8.0"
@@ -144,6 +160,16 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "block-buffer"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
+dependencies = [
+ "hybrid-array",
+ "zeroize",
+]
+
[[package]]
name = "block-padding"
version = "0.3.3"
@@ -185,22 +211,11 @@ dependencies = [
[[package]]
name = "bzip2"
-version = "0.4.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8"
-dependencies = [
- "bzip2-sys",
- "libc",
-]
-
-[[package]]
-name = "bzip2-sys"
-version = "0.1.13+1.0.8"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14"
+checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c"
dependencies = [
- "cc",
- "pkg-config",
+ "libbz2-rs-sys",
]
[[package]]
@@ -230,15 +245,17 @@ dependencies = [
[[package]]
name = "calamine"
-version = "0.23.1"
+version = "0.37.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47a4d6ea525ea187df1e3a1c4b23469b1cbe60c5bafc1c0ef14b2b8738a8303d"
+checksum = "c9ca341b94bc4b29e08970b1a03914fad2dfe177e2ecb67fcd6de9046004aafb"
dependencies = [
+ "atoi_simd",
"byteorder",
"codepage",
"encoding_rs",
+ "fast-float2",
"log",
- "quick-xml 0.31.0",
+ "quick-xml 0.42.0",
"serde",
"zip",
]
@@ -291,7 +308,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
]
[[package]]
@@ -345,6 +362,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
+
[[package]]
name = "chacha20"
version = "0.10.1"
@@ -385,10 +408,26 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
- "crypto-common",
- "inout",
+ "crypto-common 0.1.7",
+ "inout 0.1.4",
+]
+
+[[package]]
+name = "cipher"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8cf2a2c93cd704877c0858356ed03480ff301ee950b43f1cbe4573b088bfa6c"
+dependencies = [
+ "crypto-common 0.2.2",
+ "inout 0.2.5",
]
+[[package]]
+name = "cmov"
+version = "0.5.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a"
+
[[package]]
name = "codepage"
version = "0.1.2"
@@ -408,11 +447,20 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "const-oid"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
+
[[package]]
name = "constant_time_eq"
-version = "0.1.5"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
+dependencies = [
+ "rustversion",
+]
[[package]]
name = "cookie"
@@ -430,6 +478,12 @@ version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+[[package]]
+name = "cpubits"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "15b85f9c39137c3a891689859392b1bd49812121d0d61c9caf00d46ed5ce06ae"
+
[[package]]
name = "cpufeatures"
version = "0.2.17"
@@ -450,9 +504,9 @@ dependencies = [
[[package]]
name = "crc32fast"
-version = "1.5.0"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
+checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
dependencies = [
"cfg-if",
]
@@ -482,6 +536,15 @@ dependencies = [
"typenum",
]
+[[package]]
+name = "crypto-common"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "cssparser"
version = "0.36.0"
@@ -542,6 +605,15 @@ version = "0.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"
+[[package]]
+name = "ctutils"
+version = "0.4.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a2376ffd6f96d8a9db59875b4b6b0237d6900b5baf64279714e05493ce64828a"
+dependencies = [
+ "cmov",
+]
+
[[package]]
name = "darling"
version = "0.23.0"
@@ -589,6 +661,18 @@ dependencies = [
"parking_lot_core",
]
+[[package]]
+name = "debug_unsafe"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2"
+
+[[package]]
+name = "deflate64"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac6b926516df9c60bfa16e107b21086399f8285a44ca9711344b9e553c5146e2"
+
[[package]]
name = "deranged"
version = "0.5.8"
@@ -625,9 +709,21 @@ version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
- "block-buffer",
- "crypto-common",
- "subtle",
+ "block-buffer 0.10.4",
+ "crypto-common 0.1.7",
+]
+
+[[package]]
+name = "digest"
+version = "0.11.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
+dependencies = [
+ "block-buffer 0.12.1",
+ "const-oid",
+ "crypto-common 0.2.2",
+ "ctutils",
+ "zeroize",
]
[[package]]
@@ -744,7 +840,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7"
dependencies = [
- "cipher",
+ "cipher 0.4.4",
]
[[package]]
@@ -812,6 +908,12 @@ dependencies = [
"num-traits",
]
+[[package]]
+name = "fast-float2"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f"
+
[[package]]
name = "fastrand"
version = "2.4.1"
@@ -851,6 +953,7 @@ checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
+ "zlib-rs",
]
[[package]]
@@ -1240,11 +1343,11 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hmac"
-version = "0.12.1"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f"
dependencies = [
- "digest",
+ "digest 0.11.3",
]
[[package]]
@@ -1325,6 +1428,15 @@ version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
+[[package]]
+name = "hybrid-array"
+version = "0.4.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
+dependencies = [
+ "typenum",
+]
+
[[package]]
name = "hyper"
version = "1.10.1"
@@ -1562,6 +1674,15 @@ dependencies = [
"generic-array",
]
+[[package]]
+name = "inout"
+version = "0.2.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b5cf4372d022092674a83b8febf5865f7a573cc0c5baec5e49c879b6a20978f"
+dependencies = [
+ "hybrid-array",
+]
+
[[package]]
name = "ipnet"
version = "2.12.0"
@@ -1695,6 +1816,12 @@ dependencies = [
"unicode-segmentation",
]
+[[package]]
+name = "libbz2-rs-sys"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32f454fd6831a29c0e827ed075bca2a15be201bd57f4168f0fd1041124eab17e"
+
[[package]]
name = "libc"
version = "0.2.186"
@@ -1727,9 +1854,9 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.33"
+version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad"
+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
[[package]]
name = "lopdf"
@@ -1737,7 +1864,7 @@ version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c"
dependencies = [
- "aes",
+ "aes 0.8.4",
"bitflags 2.13.0",
"cbc",
"ecb",
@@ -1751,13 +1878,22 @@ dependencies = [
"nom",
"rand 0.10.2",
"rangemap",
- "sha2",
+ "sha2 0.10.9",
"stringprep",
"thiserror 2.0.18",
"ttf-parser",
"weezl",
]
+[[package]]
+name = "lzma-rust2"
+version = "0.23.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1c46f3fcd2e888afdb01a07efc071cb21300e07c68d32c3e8b01b5c8cb1fcaa"
+dependencies = [
+ "sha2 0.11.1",
+]
+
[[package]]
name = "mac"
version = "0.1.1"
@@ -1796,7 +1932,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
"cfg-if",
- "digest",
+ "digest 0.10.7",
]
[[package]]
@@ -1868,6 +2004,18 @@ version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
+[[package]]
+name = "nix"
+version = "0.31.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
+dependencies = [
+ "bitflags 2.13.0",
+ "cfg-if",
+ "cfg_aliases",
+ "libc",
+]
+
[[package]]
name = "nom"
version = "8.0.0"
@@ -2024,27 +2172,14 @@ dependencies = [
"windows-link 0.2.1",
]
-[[package]]
-name = "password-hash"
-version = "0.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700"
-dependencies = [
- "base64ct",
- "rand_core 0.6.4",
- "subtle",
-]
-
[[package]]
name = "pbkdf2"
-version = "0.11.0"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917"
+checksum = "112d82ceb8c5bf524d9af484d4e4970c9fd5a0cc15ba14ad93dccd28873b0629"
dependencies = [
- "digest",
+ "digest 0.11.3",
"hmac",
- "password-hash",
- "sha2",
]
[[package]]
@@ -2258,6 +2393,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+[[package]]
+name = "ppmd-rust"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd4acc8d264ea385db64ccfdcdfd5909ee9eda0975666723d59f3bfec80b3611"
+
[[package]]
name = "ppv-lite86"
version = "0.2.21"
@@ -2332,7 +2473,6 @@ version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1004a344b30a54e2ee58d66a71b32d2db2feb0a31f9a2d302bf0536f15de2a33"
dependencies = [
- "encoding_rs",
"memchr",
"serde",
]
@@ -2346,6 +2486,16 @@ dependencies = [
"memchr",
]
+[[package]]
+name = "quick-xml"
+version = "0.42.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b"
+dependencies = [
+ "encoding_rs",
+ "memchr",
+]
+
[[package]]
name = "quote"
version = "1.0.46"
@@ -2811,13 +2961,13 @@ dependencies = [
[[package]]
name = "sha1"
-version = "0.10.7"
+version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8"
+checksum = "aacc4cc499359472b4abe1bf11d0b12e688af9a805fa5e3016f9a386dc2d0214"
dependencies = [
"cfg-if",
- "cpufeatures 0.2.17",
- "digest",
+ "cpufeatures 0.3.0",
+ "digest 0.11.3",
]
[[package]]
@@ -2828,7 +2978,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures 0.2.17",
- "digest",
+ "digest 0.10.7",
+]
+
+[[package]]
+name = "sha2"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.0",
+ "digest 0.11.3",
]
[[package]]
@@ -2849,9 +3010,9 @@ dependencies = [
[[package]]
name = "simd-adler32"
-version = "0.3.9"
+version = "0.3.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214"
+checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
[[package]]
name = "siphasher"
@@ -2985,12 +3146,6 @@ version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-[[package]]
-name = "subtle"
-version = "2.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
-
[[package]]
name = "swift-rs"
version = "1.0.7"
@@ -3147,7 +3302,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"syn 2.0.118",
"tauri-utils",
"thiserror 2.0.18",
@@ -3349,6 +3504,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50"
dependencies = [
"deranged",
+ "js-sys",
"num-conv",
"powerfmt",
"serde_core",
@@ -3631,6 +3787,12 @@ dependencies = [
"pom",
]
+[[package]]
+name = "typed-path"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
+
[[package]]
name = "typeid"
version = "1.0.3"
@@ -4483,6 +4645,12 @@ dependencies = [
"synstructure",
]
+[[package]]
+name = "zeroize"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
+
[[package]]
name = "zerotrie"
version = "0.2.4"
@@ -4518,54 +4686,80 @@ dependencies = [
[[package]]
name = "zip"
-version = "0.6.6"
+version = "9.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
+checksum = "1156b39d142a34b999c2310a50455e0cb3760bf7efad0122f796d813bee26ccb"
dependencies = [
- "aes",
- "byteorder",
+ "aes 0.9.3",
"bzip2",
"constant_time_eq",
"crc32fast",
- "crossbeam-utils",
+ "deflate64",
"flate2",
+ "getrandom 0.4.3",
"hmac",
+ "indexmap 2.14.0",
+ "lzma-rust2",
+ "memchr",
+ "nix",
"pbkdf2",
+ "ppmd-rust",
"sha1",
"time",
+ "typed-path",
+ "windows-sys 0.61.2",
+ "zeroize",
+ "zopfli",
"zstd",
]
+[[package]]
+name = "zlib-rs"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
+
[[package]]
name = "zmij"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
+[[package]]
+name = "zopfli"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11"
+dependencies = [
+ "bumpalo",
+ "crc32fast",
+ "log",
+ "simd-adler32",
+]
+
[[package]]
name = "zstd"
-version = "0.11.2+zstd.1.5.2"
+version = "0.14.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4"
+checksum = "db3ae9bf90af6e40197bef767eeefc46ad6397420fe873830bd85e5fbbfb3c70"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "5.0.2+zstd.1.5.2"
+version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db"
+checksum = "ded520f16b29e1a9b771c722221b2b0a0398c2316d9bb3c42b458a5414d7434b"
dependencies = [
- "libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
-version = "2.0.16+zstd.1.5.7"
+version = "2.1.2+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748"
+checksum = "481ada9c543b2323cbb7bbdbb5249177fbf0188ed959ed2c15e4b22421c84ed3"
dependencies = [
"cc",
"pkg-config",
diff --git a/src-tauri/plugins/tauri-plugin-rag/Cargo.toml b/src-tauri/plugins/tauri-plugin-rag/Cargo.toml
index 462773492..6405bde7d 100644
--- a/src-tauri/plugins/tauri-plugin-rag/Cargo.toml
+++ b/src-tauri/plugins/tauri-plugin-rag/Cargo.toml
@@ -18,10 +18,10 @@ thiserror = "2.0"
tokio = { version = "1", features = ["full"] }
log = "0.4"
pdf-extract = "0.12"
-zip = "0.6"
+zip = "9"
quick-xml = { version = "0.31", features = ["serialize"] }
csv = "1.3"
-calamine = "0.23"
+calamine = "0.37"
html2text = "0.11"
chardetng = "0.1"
encoding_rs = "0.8"
diff --git a/src-tauri/plugins/tauri-plugin-rag/src/parser.rs b/src-tauri/plugins/tauri-plugin-rag/src/parser.rs
index 4bc543fc8..78d579720 100644
--- a/src-tauri/plugins/tauri-plugin-rag/src/parser.rs
+++ b/src-tauri/plugins/tauri-plugin-rag/src/parser.rs
@@ -3,7 +3,7 @@ use std::borrow::Cow;
use std::fs;
use std::io::{Cursor, Read};
use std::panic::{catch_unwind, AssertUnwindSafe};
-use calamine::{open_workbook_auto, DataType, Reader as _};
+use calamine::{open_workbook_auto, Data, Reader as _, Sheets};
use chardetng::EncodingDetector;
use csv as csv_crate;
use quick_xml::events::Event;
@@ -233,18 +233,37 @@ const MAX_EXCEL_SERIAL: f64 = 2_958_466.0;
/// Renders a cell for the model. Date cells arrive as Excel serial numbers,
/// which a model cannot read as dates, so they become ISO 8601 text.
-fn format_cell(cell: &DataType) -> String {
+fn format_cell(cell: &Data, is_1904: bool) -> String {
match cell {
- DataType::DateTime(serial) => excel_serial_to_iso(*serial),
- DataType::Duration(days) => excel_duration(*days),
+ Data::DateTime(dt) if dt.is_duration() => excel_duration(dt.as_f64()),
+ Data::DateTime(dt) => excel_serial_to_iso(if is_1904 {
+ dt.as_f64() + EXCEL_1900_1904_DAYS
+ } else {
+ dt.as_f64()
+ }),
other => other.to_string(),
}
}
-/// Converts a 1900-system serial. calamine 0.23 already shifts 1904-system
-/// workbooks onto this system (`format_excel_f64_ref` adds 1462 days when
-/// xlsx `date1904`, xls record 0x0022 or the xlsb flag is set), and ods dates
-/// arrive as `DateTimeIso`, so no epoch detection is needed here.
+/// Days between the 1900 epoch (serial 0 = 1900-01-00) and the 1904 epoch
+/// (serial 0 = 1904-01-01), in Excel's 1900 numbering.
+const EXCEL_1900_1904_DAYS: f64 = 1462.0;
+
+/// Whether the workbook counts dates from 1904 (`date1904` in xlsx, record
+/// 0x0022 in xls, the flag in xlsb). calamine hands cells back in the
+/// workbook's own epoch, so the caller has to say which one it was. ods
+/// dates arrive as ISO text and never need this.
+fn uses_1904_epoch<RS: Read + std::io::Seek>(workbook: &Sheets<RS>) -> bool {
+ match workbook {
+ Sheets::Xlsx(w) => w.has_1904_epoch(),
+ Sheets::Xls(w) => w.has_1904_epoch(),
+ Sheets::Xlsb(w) => w.has_1904_epoch(),
+ Sheets::Ods(_) => false,
+ }
+}
+
+/// Converts a 1900-system serial. A 1904-system workbook is shifted onto this
+/// system by `format_cell` before it gets here.
fn excel_serial_to_iso(serial: f64) -> String {
if !serial.is_finite() || !(0.0..MAX_EXCEL_SERIAL).contains(&serial) {
return serial.to_string();
@@ -318,6 +337,7 @@ fn parse_spreadsheet(file_path: &str) -> Result<String, RagError> {
}
let mut workbook = open_workbook_auto(file_path)
.map_err(|e| RagError::ParseError(e.to_string()))?;
+ let is_1904 = uses_1904_epoch(&workbook);
let mut out = String::new();
for sheet_name in workbook.sheet_names().to_owned() {
if let Ok(range) = workbook.worksheet_range(&sheet_name) {
@@ -325,7 +345,7 @@ fn parse_spreadsheet(file_path: &str) -> Result<String, RagError> {
for row in range.rows() {
let cells = row
.iter()
- .map(format_cell)
+ .map(|cell| format_cell(cell, is_1904))
.collect::<Vec<_>>()
.join("\t");
out.push_str(&cells);
@@ -348,7 +368,11 @@ fn parse_pptx(file_path: &str) -> Result<String, RagError> {
// Collect slide files: ppt/slides/slide*.xml
let mut slides = Vec::new();
for i in 0..zip.len() {
- let name = zip.by_index(i).map(|f| f.name().to_string()).unwrap_or_default();
+ let name = zip
+ .by_index(i)
+ .ok()
+ .and_then(|f| f.name().ok().map(|n| n.into_owned()))
+ .unwrap_or_default();
if name.starts_with("ppt/slides/") && name.ends_with(".xml") {
slides.push(name);
}
@@ -437,57 +461,172 @@ fn read_text_auto(file_path: &str) -> Result<String, RagError> {
#[cfg(test)]
mod tests {
use super::*;
+ use calamine::{ExcelDateTime, ExcelDateTimeType};
+ use std::io::Write;
+
+ fn serial(v: f64) -> Data {
+ Data::DateTime(ExcelDateTime::new(v, ExcelDateTimeType::DateTime, false))
+ }
+
+ /// Writes a zip with the given entries to a unique temp path.
+ fn zip_file(name: &str, entries: &[(&str, &str)]) -> std::path::PathBuf {
+ let path = std::env::temp_dir().join(format!("jan-rag-{}-{name}", std::process::id()));
+ let mut zw = zip::ZipWriter::new(fs::File::create(&path).unwrap());
+ let opts = zip::write::SimpleFileOptions::default();
+ for (entry, body) in entries {
+ zw.start_file(*entry, opts).unwrap();
+ zw.write_all(body.as_bytes()).unwrap();
+ }
+ zw.finish().unwrap();
+ path
+ }
#[test]
fn date_only_serial_renders_as_iso_date() {
- assert_eq!(format_cell(&DataType::DateTime(45123.0)), "2023-07-16");
+ assert_eq!(format_cell(&serial(45123.0), false), "2023-07-16");
}
#[test]
fn serial_with_time_renders_as_iso_datetime() {
- assert_eq!(format_cell(&DataType::DateTime(45123.5)), "2023-07-16T12:00:00");
+ assert_eq!(format_cell(&serial(45123.5), false), "2023-07-16T12:00:00");
}
#[test]
fn time_only_serial_renders_as_time() {
- assert_eq!(format_cell(&DataType::DateTime(0.75)), "18:00:00");
+ assert_eq!(format_cell(&serial(0.75), false), "18:00:00");
}
#[test]
fn serials_before_the_phantom_leap_day_are_not_shifted() {
- assert_eq!(format_cell(&DataType::DateTime(1.0)), "1900-01-01");
- assert_eq!(format_cell(&DataType::DateTime(59.0)), "1900-02-28");
- assert_eq!(format_cell(&DataType::DateTime(61.0)), "1900-03-01");
+ assert_eq!(format_cell(&serial(1.0), false), "1900-01-01");
+ assert_eq!(format_cell(&serial(59.0), false), "1900-02-28");
+ assert_eq!(format_cell(&serial(61.0), false), "1900-03-01");
}
#[test]
fn phantom_leap_day_renders_as_excel_shows_it() {
// Excel displays serial 60 as 1900-02-29; collapsing it onto 02-28
// would make two different cells read as the same date.
- assert_eq!(format_cell(&DataType::DateTime(60.0)), "1900-02-29");
+ assert_eq!(format_cell(&serial(60.0), false), "1900-02-29");
}
#[test]
fn seconds_round_instead_of_truncating() {
// 10:00:00 as a float is slightly below the exact value.
assert_eq!(
- format_cell(&DataType::DateTime(44927.0 + 10.0 / 24.0)),
+ format_cell(&serial(44927.0 + 10.0 / 24.0), false),
"2023-01-01T10:00:00"
);
}
#[test]
fn durations_render_as_elapsed_time() {
- assert_eq!(format_cell(&DataType::Duration(1.5)), "36:00:00");
+ let d = Data::DateTime(ExcelDateTime::new(1.5, ExcelDateTimeType::TimeDelta, false));
+ assert_eq!(format_cell(&d, false), "36:00:00");
}
#[test]
fn iso_variants_pass_through() {
assert_eq!(
- format_cell(&DataType::DateTimeIso("2024-02-29T08:15:00".into())),
+ format_cell(&Data::DateTimeIso("2024-02-29T08:15:00".into()), false),
"2024-02-29T08:15:00"
);
- assert_eq!(format_cell(&DataType::DurationIso("PT1H".into())), "PT1H");
+ assert_eq!(format_cell(&Data::DurationIso("PT1H".into()), false), "PT1H");
+ }
+
+ #[test]
+ fn serial_in_a_1904_workbook_is_the_same_calendar_date() {
+ // 2023-07-16 is 45123 in the 1900 system and 43661 in the 1904 one.
+ let d = Data::DateTime(ExcelDateTime::new(43661.0, ExcelDateTimeType::DateTime, true));
+ assert_eq!(format_cell(&d, true), "2023-07-16");
+ }
+
+ #[test]
+ fn xlsx_1904_workbook_dates_survive_the_calamine_read() {
+ const REL: &str = r#"<?xml version="1.0" encoding="UTF-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">"#;
+ let path = zip_file(
+ "date1904.xlsx",
+ &[
+ (
+ "[Content_Types].xml",
+ r#"<?xml version="1.0" encoding="UTF-8"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>"#,
+ ),
+ (
+ "_rels/.rels",
+ &format!(r#"{REL}<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>"#),
+ ),
+ (
+ "xl/workbook.xml",
+ r#"<?xml version="1.0" encoding="UTF-8"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><workbookPr date1904="1"/><sheets><sheet name="Data" sheetId="1" r:id="rId1"/></sheets></workbook>"#,
+ ),
+ (
+ "xl/_rels/workbook.xml.rels",
+ &format!(r#"{REL}<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>"#),
+ ),
+ (
+ "xl/styles.xml",
+ r#"<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><fonts count="1"><font><sz val="11"/></font></fonts><fills count="1"><fill><patternFill patternType="none"/></fill></fills><borders count="1"><border/></borders><cellStyleXfs count="1"><xf/></cellStyleXfs><cellXfs count="2"><xf numFmtId="0"/><xf numFmtId="14" applyNumberFormat="1"/></cellXfs></styleSheet>"#,
+ ),
+ (
+ "xl/worksheets/sheet1.xml",
+ r#"<?xml version="1.0" encoding="UTF-8"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><sheetData><row r="1"><c r="A1" t="inlineStr"><is><t>when</t></is></c><c r="B1" s="1"><v>43661.5</v></c></row></sheetData></worksheet>"#,
+ ),
+ ],
+ );
+ let out = parse_spreadsheet(path.to_str().unwrap());
+ let _ = fs::remove_file(&path);
+ assert_eq!(out.unwrap(), "# Sheet: Data\nwhen\t2023-07-16T12:00:00\n\n");
+ }
+
+ #[test]
+ fn docx_text_is_read_from_document_xml() {
+ let path = zip_file(
+ "text.docx",
+ &[(
+ "word/document.xml",
+ r#"<?xml version="1.0"?><w:document xmlns:w="w"><w:body><w:p><w:r><w:t>First</w:t></w:r></w:p><w:p><w:r><w:t>Second</w:t></w:r></w:p></w:body></w:document>"#,
+ )],
+ );
+ let out = parse_docx(path.to_str().unwrap());
+ let _ = fs::remove_file(&path);
+ assert_eq!(out.unwrap(), "First\nSecond");
+ }
+
+ #[test]
+ fn docx_without_document_xml_is_a_parse_error() {
+ let path = zip_file("nodoc.docx", &[("hello.txt", "x")]);
+ let out = parse_docx(path.to_str().unwrap());
+ let _ = fs::remove_file(&path);
+ assert!(matches!(out, Err(RagError::ParseError(m)) if m.contains("document.xml")));
+ }
+
+ #[test]
+ fn pptx_slides_are_read_in_name_order_and_other_entries_ignored() {
+ let slide = |t: &str| {
+ format!(r#"<p:sld xmlns:p="p" xmlns:a="a"><a:p><a:r><a:t>{t}</a:t></a:r></a:p></p:sld>"#)
+ };
+ let s2 = slide("Two");
+ let s1 = slide("One");
+ let path = zip_file(
+ "deck.pptx",
+ &[
+ ("ppt/slides/slide2.xml", &s2),
+ ("ppt/notesSlides/notesSlide1.xml", &slide("Notes")),
+ ("ppt/slides/slide1.xml", &s1),
+ ],
+ );
+ let out = parse_pptx(path.to_str().unwrap());
+ let _ = fs::remove_file(&path);
+ assert_eq!(out.unwrap(), "One \n\nTwo \n\n");
+ }
+
+ #[test]
+ fn a_file_that_is_not_a_zip_is_a_parse_error_not_a_panic() {
+ let path = std::env::temp_dir().join(format!("jan-rag-{}-fake.docx", std::process::id()));
+ fs::write(&path, "not a zip").unwrap();
+ let out = parse_docx(path.to_str().unwrap());
+ let _ = fs::remove_file(&path);
+ assert!(matches!(out, Err(RagError::ParseError(_))));
}
#[test]
diff --git a/src-tauri/src/core/cli/updater.rs b/src-tauri/src/core/cli/updater.rs
index 2bae3ae6c..c994c6884 100644
--- a/src-tauri/src/core/cli/updater.rs
+++ b/src-tauri/src/core/cli/updater.rs
@@ -375,7 +375,7 @@ fn extract_from_zip(archive: &Path, out: &mut impl Write) -> Result<bool, String
let mut zip = zip::ZipArchive::new(file).map_err(|e| e.to_string())?;
for i in 0..zip.len() {
let mut entry = zip.by_index(i).map_err(|e| e.to_string())?;
- let matches = entry.enclosed_name().map(is_binary_entry).unwrap_or(false);
+ let matches = entry.enclosed_name().is_some_and(|p| is_binary_entry(&p));
if matches {
io::copy(&mut entry, out).map_err(|e| e.to_string())?;
return Ok(true);
@@ -662,7 +662,7 @@ mod tests {
let mut zip = zip::ZipWriter::new(Cursor::new(Vec::new()));
zip.start_file(
format!("src-tauri/target/release/{BINARY_NAME}"),
- zip::write::FileOptions::default(),
+ zip::write::SimpleFileOptions::default(),
)
.unwrap();
zip.write_all(b"MZ-payload").unwrap();
diff --git a/src-tauri/src/core/filesystem/commands.rs b/src-tauri/src/core/filesystem/commands.rs
index caeddcf2d..749720d5c 100644
--- a/src-tauri/src/core/filesystem/commands.rs
+++ b/src-tauri/src/core/filesystem/commands.rs
@@ -242,7 +242,7 @@ pub(crate) fn unpack_archive(
.ok_or_else(|| "Invalid zip entry path".to_string())?,
);
- if entry.name().ends_with('/') {
+ if entry.is_dir() {
std::fs::create_dir_all(&outpath).map_err(|e| e.to_string())?;
} else {
if let Some(parent) = outpath.parent() {
diff --git a/src-tauri/src/core/filesystem/tests.rs b/src-tauri/src/core/filesystem/tests.rs
index ef44b8a7d..6a85c5f82 100644
--- a/src-tauri/src/core/filesystem/tests.rs
+++ b/src-tauri/src/core/filesystem/tests.rs
@@ -285,6 +285,55 @@ fn test_unpack_archive_tar_gz() {
let _ = fs::remove_dir_all(&dir);
}
+#[test]
+fn test_unpack_archive_zip() {
+ let dir = unique_test_dir("unpack-zip");
+ fs::create_dir_all(&dir).unwrap();
+ let archive_path = dir.join("backend.zip");
+ {
+ let mut zw = zip::ZipWriter::new(File::create(&archive_path).unwrap());
+ let opts = zip::write::SimpleFileOptions::default();
+ zw.add_directory("build/", opts).unwrap();
+ zw.start_file("build/bin/llama-server", opts).unwrap();
+ zw.write_all(b"binary").unwrap();
+ zw.start_file("top.txt", opts).unwrap();
+ zw.write_all(b"top").unwrap();
+ zw.finish().unwrap();
+ }
+
+ let out = dir.join("out");
+ unpack_archive(&archive_path, &out).unwrap();
+ assert!(out.join("build").is_dir());
+ assert_eq!(
+ fs::read_to_string(out.join("build/bin/llama-server")).unwrap(),
+ "binary"
+ );
+ assert_eq!(fs::read_to_string(out.join("top.txt")).unwrap(), "top");
+
+ let _ = fs::remove_dir_all(&dir);
+}
+
+#[test]
+fn test_unpack_archive_zip_rejects_entries_that_escape_the_output_dir() {
+ let dir = unique_test_dir("unpack-zip-slip");
+ fs::create_dir_all(&dir).unwrap();
+ let archive_path = dir.join("evil.zip");
+ {
+ let mut zw = zip::ZipWriter::new(File::create(&archive_path).unwrap());
+ let opts = zip::write::SimpleFileOptions::default();
+ zw.start_file("../escaped.txt", opts).unwrap();
+ zw.write_all(b"pwned").unwrap();
+ zw.finish().unwrap();
+ }
+
+ let out = dir.join("out");
+ assert!(unpack_archive(&archive_path, &out).is_err());
+ assert!(!dir.join("escaped.txt").exists());
+ assert!(!out.join("escaped.txt").exists());
+
+ let _ = fs::remove_dir_all(&dir);
+}
+
#[test]
fn test_unpack_archive_rejects_unknown_extension() {
let dir = unique_test_dir("unpack-bad");