From 19fe8f03fecfa2bac13c64472bccf19d65099505 Mon Sep 17 00:00:00 2001 From: jrconlin Date: Wed, 27 Oct 2021 10:54:46 -0700 Subject: [PATCH 1/4] bug: remove `dbg!()` Closes #287 --- autoendpoint/src/extractors/authorization_check.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoendpoint/src/extractors/authorization_check.rs b/autoendpoint/src/extractors/authorization_check.rs index a6920a67..c13a1052 100644 --- a/autoendpoint/src/extractors/authorization_check.rs +++ b/autoendpoint/src/extractors/authorization_check.rs @@ -35,7 +35,7 @@ impl AuthorizationCheck { sign_with_key(key.as_bytes(), uaid.to_simple().to_string().as_bytes()) .map_err(ApiErrorKind::RegistrationSecretHash)?; - dbg!(&expected_token, &token); + debug!(&expected_token, &token); if expected_token.len() == token.len() && openssl::memcmp::eq(expected_token.as_bytes(), token.as_bytes()) { From a792af4b21cf967d48316658612e2fdd129677f1 Mon Sep 17 00:00:00 2001 From: jrconlin Date: Wed, 27 Oct 2021 11:02:19 -0700 Subject: [PATCH 2/4] f add future clippy line --- .circleci/config.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a345e748..898820ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,7 +85,10 @@ jobs: cargo build - run: name: Check formatting - command: cargo fmt -- --check + command: | + cargo fmt -- --check + # currently a2 needs clippy love before we can enable this. + # cargo clippy --all --all-targtes --all-features -- -D warnings --deny=clippy::dbg_macro - run: name: Integration tests command: py.test -v From 245242d3cd0fa1fb7a38e448bd70d7d988d02087 Mon Sep 17 00:00:00 2001 From: jrconlin Date: Wed, 27 Oct 2021 13:14:16 -0700 Subject: [PATCH 3/4] r's resolved clippy issue locally --- .circleci/config.yml | 3 +-- autoendpoint/src/extractors/authorization_check.rs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 898820ba..61382b4a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,8 +87,7 @@ jobs: name: Check formatting command: | cargo fmt -- --check - # currently a2 needs clippy love before we can enable this. - # cargo clippy --all --all-targtes --all-features -- -D warnings --deny=clippy::dbg_macro + cargo clippy --all --all-targtes --all-features -- -D warnings --deny=clippy::dbg_macro - run: name: Integration tests command: py.test -v diff --git a/autoendpoint/src/extractors/authorization_check.rs b/autoendpoint/src/extractors/authorization_check.rs index c13a1052..e4e7c742 100644 --- a/autoendpoint/src/extractors/authorization_check.rs +++ b/autoendpoint/src/extractors/authorization_check.rs @@ -35,7 +35,7 @@ impl AuthorizationCheck { sign_with_key(key.as_bytes(), uaid.to_simple().to_string().as_bytes()) .map_err(ApiErrorKind::RegistrationSecretHash)?; - debug!(&expected_token, &token); + debug!("expected: {:?}, recv'd {:?}", &expected_token, &token); if expected_token.len() == token.len() && openssl::memcmp::eq(expected_token.as_bytes(), token.as_bytes()) { From af4ec32490c7ec2b2094d8150eb9a3c82a26f90f Mon Sep 17 00:00:00 2001 From: jrconlin Date: Thu, 28 Oct 2021 13:53:57 -0700 Subject: [PATCH 4/4] f fix tyop, add audit passes --- .cargo/audit.toml | 2 ++ .circleci/config.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 41786418..ccddb188 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -4,4 +4,6 @@ ignore = [ "RUSTSEC-2021-0078", # Bound by Sentry 0.19 requiring Hyper 0.13 "RUSTSEC-2021-0079", # Bound by Sentry 0.19 requiring Hyper 0.13 "RUSTSEC-2021-0115", # Bound by rusoto 0.45 & fernet 0.1.4 (not a risk) + "RUSTSEC-2020-0159", # Bound by time + "RUSTSEC-2020-0071", # Bound by sentry, cadence, etc. ] diff --git a/.circleci/config.yml b/.circleci/config.yml index 61382b4a..5c670f38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,7 +87,7 @@ jobs: name: Check formatting command: | cargo fmt -- --check - cargo clippy --all --all-targtes --all-features -- -D warnings --deny=clippy::dbg_macro + cargo clippy --all --all-targets --all-features -- -D warnings --deny=clippy::dbg_macro - run: name: Integration tests command: py.test -v