Skip to content

Commit e4c153e

Browse files
authored
feat: remove stage key debugging code (#867)
1 parent d22de1d commit e4c153e

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

autoendpoint/src/settings.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,7 @@ impl VapidTracker {
222222
};
223223
let result = self.0.contains(&key);
224224

225-
// The following has been elevated for diagnostic purposes and should be returned as `debug` once
226-
// reliability issues are addressed
227-
warn!("🔍 Checking {:?} {}", &vapid.public_key, {
225+
debug!("🔍 Checking {:?} {}", &vapid.public_key, {
228226
if result {
229227
"Match!"
230228
} else {

autopush-common/src/util/mod.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,7 @@ pub fn b64_encode_std(input: &Vec<u8>) -> String {
4747

4848
/// Try to decode the string, first as URL safe, then as STD.
4949
pub fn b64_decode(input: &str) -> Result<Vec<u8>, base64::DecodeError> {
50-
// This is very verbose, but for some reason the key on stage is failing.
51-
// This code should help identify the cause and should be temporary.
52-
match b64_decode_url(input) {
53-
Ok(v) => Ok(v),
54-
Err(base64::DecodeError::InvalidByte(pos, chr)) => {
55-
warn!(
56-
"Decode: invalid byte {:?} at {} in {:?}",
57-
chr as char, pos, input
58-
);
59-
b64_decode_std(input)
60-
}
61-
Err(e) => {
62-
warn!("Decode: Unexpected error {:?} for {:?}", &e, input);
63-
Err(e)
64-
}
65-
}
50+
b64_decode_url(input).or_else(|_| b64_decode_std(input))
6651
}
6752

6853
pub fn deserialize_u32_to_duration<'de, D>(deserializer: D) -> Result<Duration, D::Error>

0 commit comments

Comments
 (0)