mirror of
https://gitlab.com/schmiddi-on-mobile/flare.git
synced 2026-10-27 14:07:46 -04:00
fix(libsecret): Fix libsecret stores which can lock items
Currently untested to actually fix the issue. Fixes #88.
This commit is contained in:
1 parent
262f2c4d2d
commit
968a3d6f95
4 files changed
+11
-42
No files matched your search
@@ -10,6 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Better UI for linking.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Handle libsecret stores that can lock specific items.
|
||||
|
||||
## [0.9.3] - 2023-08-17
|
||||
|
||||
### Added
|
||||
|
||||
Generated
+2
-41
@@ -784,27 +784,6 @@ dependencies = [
|
||||
"subtle",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs"
|
||||
version = "5.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
||||
dependencies = [
|
||||
"dirs-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dirs-sys"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"option-ext",
|
||||
"redox_users",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "displaydoc"
|
||||
version = "0.2.4"
|
||||
@@ -2437,9 +2416,9 @@ checksum = "44d11de466f4a3006fe8a5e7ec84e93b79c70cb992ae0aa0eb631ad2df8abfe2"
|
||||
|
||||
[[package]]
|
||||
name = "oo7"
|
||||
version = "0.1.2"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1007a6c292751abc192f8dbeef8341bac074e991be7b0eb27a6aece5ee79b4dd"
|
||||
checksum = "220729ba847d98e1a9902c05e41dae79ce4a0b913dad68bc540dd3120a8c2b6b"
|
||||
dependencies = [
|
||||
"aes 0.8.3",
|
||||
"async-global-executor",
|
||||
@@ -2448,7 +2427,6 @@ dependencies = [
|
||||
"cbc",
|
||||
"cipher 0.4.4",
|
||||
"digest 0.10.7",
|
||||
"dirs",
|
||||
"futures-util",
|
||||
"hkdf 0.12.3",
|
||||
"hmac 0.12.1",
|
||||
@@ -2475,12 +2453,6 @@ version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||
|
||||
[[package]]
|
||||
name = "option-ext"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
||||
|
||||
[[package]]
|
||||
name = "ordered-stream"
|
||||
version = "0.2.0"
|
||||
@@ -3047,17 +3019,6 @@ dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
|
||||
dependencies = [
|
||||
"getrandom 0.2.10",
|
||||
"redox_syscall 0.2.16",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.9.3"
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ libsignal-service = { git = "https://github.com/whisperfish/libsignal-service-rs
|
||||
|
||||
async-trait = "0.1.72"
|
||||
sled = "0.34.7"
|
||||
oo7 = { version = "0.1.2", default-features = false, features = ["native_crypto", "async-std"] }
|
||||
oo7 = { version = "0.2.1", default-features = false, features = ["native_crypto", "async-std"] }
|
||||
rand = "0.8.5"
|
||||
zeroize = "1.6.0"
|
||||
hex = "0.4.3"
|
||||
|
||||
@@ -51,6 +51,10 @@ async fn encryption_password() -> Result<String, ApplicationError> {
|
||||
|
||||
if let Some(item) = item {
|
||||
log::trace!("Password found");
|
||||
if item.is_locked().await? {
|
||||
log::trace!("Item is locked. Unlocking.");
|
||||
item.unlock().await?;
|
||||
}
|
||||
let secret_bytes = item.secret().await?;
|
||||
// Should normally not be lossy, but just in case
|
||||
let secret = String::from_utf8_lossy(&secret_bytes).into_owned();
|
||||
|
||||
Reference in new issue
Block a user