@@ -8408,8 +8408,7 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
[[package]]
name = "oo7"
version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fc6ce4692fbfd044ce22ca07dcab1a30fa12432ca2aa5b1294eca50d3332a24"
+source = "git+https://github.com/zed-industries/oo7?branch=avoid-crypto-panic#9d5d5fcd7e4e0add9b420ffb58f67661b0b37568"
dependencies = [
"aes",
"async-fs 2.1.2",
@@ -148,7 +148,7 @@ pathfinder_geometry = "0.5"
[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
# Always used
flume = "0.11"
-oo7 = "0.3.0"
+oo7 = { git = "https://github.com/zed-industries/oo7", branch = "avoid-crypto-panic" }
# Used in both windowing options
ashpd = { workspace = true, optional = true }
@@ -1,6 +1,5 @@
use std::{
env,
- panic::AssertUnwindSafe,
path::{Path, PathBuf},
process::Command,
rc::Rc,
@@ -18,7 +17,7 @@ use std::{
use anyhow::{anyhow, Context as _};
use async_task::Runnable;
use calloop::{channel::Channel, LoopSignal};
-use futures::{channel::oneshot, future::FutureExt};
+use futures::channel::oneshot;
use util::ResultExt as _;
#[cfg(any(feature = "wayland", feature = "x11"))]
use xkbcommon::xkb::{self, Keycode, Keysym, State};
@@ -485,12 +484,7 @@ impl<P: LinuxClient + 'static> Platform for P {
let username = attributes
.get("username")
.ok_or_else(|| anyhow!("Cannot find username in stored credentials"))?;
- // oo7 panics if the retrieved secret can't be decrypted due to
- // unexpected padding.
- let secret = AssertUnwindSafe(item.secret())
- .catch_unwind()
- .await
- .map_err(|_| anyhow!("oo7 panicked while trying to read credentials"))??;
+ let secret = item.secret().await?;
// we lose the zeroizing capabilities at this boundary,
// a current limitation GPUI's credentials api