Skip to content

Commit

Permalink
Update fragile to 2.0.0 (#1533)
Browse files Browse the repository at this point in the history
This updates fragile to 2.0.0 as 1.2.x has a soundness issue:
mitsuhiko/fragile#26

Co-authored-by: Oleksandr Kylymnychenko <oleksandr@sentry.io>
  • Loading branch information
mitsuhiko and olksdr committed Nov 3, 2022
1 parent 07eff5a commit 2f65203
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion relay-server/Cargo.toml
Expand Up @@ -35,7 +35,7 @@ chrono = { version = "0.4.11", features = ["serde"] }
clap = "2.33.1"
failure = "0.1.8"
flate2 = "1.0.19"
fragile = { version = "1.2.1", features = ["slab"] } # used for vendoring sentry-actix
fragile = { version = "2.0.0", features = ["slab"] } # used for vendoring sentry-actix
futures = { version = "0.3", package = "futures", features = ["compat"] }
futures01 = { version = "0.1.28", package = "futures" }
hashbrown = "0.12.3"
Expand Down
4 changes: 3 additions & 1 deletion relay-server/src/middlewares.rs
Expand Up @@ -199,12 +199,14 @@ impl<S: 'static> Middleware<S> for SentryMiddleware {
let root_scope = hub.push_scope();
hub.configure_scope(move |scope| {
scope.add_event_processor(move |mut event| {
fragile::stack_token!(tok);

let mut cached_data = cached_data.lock().unwrap();
if cached_data.is_none() && req.is_valid() {
let with_pii = client
.as_ref()
.map_or(false, |x| x.options().send_default_pii);
*cached_data = Some(extract_request(req.get(), with_pii));
*cached_data = Some(extract_request(req.get(tok), with_pii));
}

if let Some((ref transaction, ref req)) = *cached_data {
Expand Down

0 comments on commit 2f65203

Please sign in to comment.