try removing bom

This commit is contained in:
rustdesk
2025-06-16 23:14:49 +09:00
parent bfd6ca79f8
commit 57b826c56b

View File

@@ -1297,7 +1297,9 @@ pub async fn change_id_shared(id: String, old_id: String) -> String {
pub async fn change_id_shared_(id: String, old_id: String) -> &'static str {
if !hbb_common::is_valid_custom_id(&id) {
log::debug!("debugging invalid id: \"{id}\", base64: \"{}\"", crate::encode64(&id));
log::debug!("debugging invalid id: \"{id}\", len: {}, base64: \"{}\"", id.len(), crate::encode64(&id));
let bom = id.trim_start_matches('\u{FEFF}');
log::debug!("bom: {}", hbb_common::is_valid_custom_id(&bom));
return INVALID_FORMAT;
}