From f20679f24aa1c04215aaea4e93e77819190bc9ab Mon Sep 17 00:00:00 2001 From: Robin Fackler Date: Wed, 23 Nov 2022 15:29:28 +0100 Subject: [PATCH] Fix crash if id == "base64_" --- libs/hbb_common/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hbb_common/src/config.rs b/libs/hbb_common/src/config.rs index 8adeae6fe..2f989fd87 100644 --- a/libs/hbb_common/src/config.rs +++ b/libs/hbb_common/src/config.rs @@ -931,7 +931,7 @@ impl PeerConfig { .to_owned(); let id_decoded_string: String; - if id.starts_with("base64_") { + if id.starts_with("base64_") && id != "base64_" { let id_decoded = base64::decode(&id[7..], base64::Variant::Original) .unwrap_or(Vec::new()); id_decoded_string =