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