mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-17 13:46:27 -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)
|
||||
})?;
|
||||
|
||||
// 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
|
||||
if res.contains("Challenge") {
|
||||
let Some((message, input_str)) = parse_mfa(&res) else {
|
||||
|
||||
Reference in new issue
Block a user