mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
Do not error when region is not found
This commit is contained in:
parent
8860efa82e
commit
0a55506077
@ -150,8 +150,10 @@ fn parse_res_xml(res_xml: String, is_gateway: bool) -> anyhow::Result<Prelogin>
|
|||||||
bail!("Prelogin failed: {}", msg)
|
bail!("Prelogin failed: {}", msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
let region = xml::get_child_text(&doc, "region")
|
let region = xml::get_child_text(&doc, "region").unwrap_or_else(|| {
|
||||||
.ok_or_else(|| anyhow::anyhow!("Prelogin response does not contain region element"))?;
|
info!("Prelogin response does not contain region element");
|
||||||
|
String::from("Unknown")
|
||||||
|
});
|
||||||
|
|
||||||
let saml_method = xml::get_child_text(&doc, "saml-auth-method");
|
let saml_method = xml::get_child_text(&doc, "saml-auth-method");
|
||||||
let saml_request = xml::get_child_text(&doc, "saml-request");
|
let saml_request = xml::get_child_text(&doc, "saml-request");
|
||||||
|
Loading…
Reference in New Issue
Block a user