Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Use a temporary fork of oo7 (#22751)
Cole Miller0a8e9c0fe249
diff --git a/Cargo.lock b/Cargo.lockindex 9d10fe090a9..cc77ab6e8e3 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -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",diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.tomlindex 63aac122a8a..952fed02fe8 100644--- a/crates/gpui/Cargo.toml+++ b/crates/gpui/Cargo.toml@@ -148,7 +148,7 @@ pathfinder_geometry = "0.5"[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]# Always usedflume = "0.11"-oo7 = "0.3.0"+oo7 = { git = "https://github.com/zed-industries/oo7", branch = "avoid-crypto-panic" }# Used in both windowing optionsashpd = { workspace = true, optional = true }diff --git a/crates/gpui/src/platform/linux/platform.rs b/crates/gpui/src/platform/linux/platform.rsindex 52b7e7e8d3f..e897b5eb48e 100644--- a/crates/gpui/src/platform/linux/platform.rs+++ b/crates/gpui/src/platform/linux/platform.rs@@ -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