mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
fix: log empty gateway login response headers and handle accordingly
This commit is contained in:
1 file changed
+6
@@ -43,6 +43,12 @@ pub async fn gateway_login(gateway: &str, cred: &Credential, gp_params: &GpParam
|
|||||||
anyhow::anyhow!("Gateway login error: {}", err.reason)
|
anyhow::anyhow!("Gateway login error: {}", err.reason)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
// It's possible to get an empty response, log the response headers for debugging
|
||||||
|
if res.trim().is_empty() {
|
||||||
|
debug!("Empty gateway login response headers: {:?}", res);
|
||||||
|
bail!("Got empty gateway login response");
|
||||||
|
}
|
||||||
|
|
||||||
// MFA detected
|
// MFA detected
|
||||||
if res.contains("Challenge") {
|
if res.contains("Challenge") {
|
||||||
let Some((message, input_str)) = parse_mfa(&res) else {
|
let Some((message, input_str)) = parse_mfa(&res) else {
|
||||||
|
|||||||
Reference in new issue
Block a user