fix(cli): Downgrade minisign to 0.7.3 once again (#8838)

* fix(cli): Downgrade minisign to 0.7.3 once again

* add tests

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
Fabian-Lars 2024-02-16 12:24:00 +01:00 committed by GitHub
parent e52d5e573f
commit 052e8b4311
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 3 deletions

View File

@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Downgrade minisign dependency fixing updater signing key bug and prevent it from happening in the future.

View File

@ -2618,9 +2618,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "minisign"
version = "0.7.5"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2b6f58413c6cee060115673578e47271838f3c87cb9322c61a3bcd6d740b7d2"
checksum = "b23ef13ff1d745b1e52397daaa247e333c607f3cff96d4df2b798dc252db974b"
dependencies = [
"getrandom 0.2.11",
"rpassword",

View File

@ -65,7 +65,7 @@ toml = "0.8"
jsonschema = "0.17"
handlebars = "5.0"
include_dir = "0.7"
minisign = "=0.7.5"
minisign = "=0.7.3"
base64 = "0.21.5"
ureq = { version = "2.8", default-features = false, features = [ "gzip" ] }
os_info = "3"

View File

@ -160,3 +160,19 @@ where
.map_err(|e| minisign::PError::new(minisign::ErrorKind::Io, e))?;
Ok(BufReader::new(file))
}
#[cfg(test)]
mod tests {
const PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5dkpDN09RZm5GeVAzc2RuYlNzWVVJelJRQnNIV2JUcGVXZUplWXZXYXpqUUFBQkFBQUFBQUFBQUFBQUlBQUFBQTZrN2RnWGh5dURxSzZiL1ZQSDdNcktiaHRxczQwMXdQelRHbjRNcGVlY1BLMTBxR2dpa3I3dDE1UTVDRDE4MXR4WlQwa1BQaXdxKy9UU2J2QmVSNXhOQWFDeG1GSVllbUNpTGJQRkhhTnROR3I5RmdUZi90OGtvaGhJS1ZTcjdZU0NyYzhQWlQ5cGM9Cg==";
// we use minisign=0.7.3 to prevent a breaking change
#[test]
fn empty_password_is_valid() {
let path = std::env::temp_dir().join("minisign-password-text.txt");
std::fs::write(&path, b"TAURI").expect("failed to write test file");
let secret_key =
super::secret_key(PRIVATE_KEY, Some("".into())).expect("failed to resolve secret key");
super::sign_file(&secret_key, &path).expect("failed to sign file");
}
}