mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
fix: redact tunnel keys, preserve cached login and correct HIP handling
This commit is contained in:
18 files changed
+412
-196
No files matched your search
@@ -207,10 +207,13 @@ pub async fn retrieve_config(
|
||||
}
|
||||
})?;
|
||||
|
||||
parse_gp_response(res).await.or_else(|err| {
|
||||
parse_gp_response(res).await.or_else(|mut err| {
|
||||
if let Some(tls) = ServerTlsError::from_request(&server_url, &err, gp_params.has_client_identity()) {
|
||||
return Err(tls);
|
||||
}
|
||||
if let Some(error) = err.take_body_read_error() {
|
||||
return Err(PortalError::NetworkError(error).into());
|
||||
}
|
||||
if gp_params.os_profile().client_os() == crate::os_profile::ClientOs::Ios && err.is_authentication_rejection() {
|
||||
return Err(anyhow::anyhow!(crate::error::AuthenticationRejected));
|
||||
}
|
||||
@@ -278,10 +281,13 @@ async fn retrieve_csc_config(
|
||||
}
|
||||
})?;
|
||||
|
||||
parse_gp_response(res).await.or_else(|err| {
|
||||
parse_gp_response(res).await.or_else(|mut err| {
|
||||
if let Some(tls) = ServerTlsError::from_request(&server_url, &err, gp_params.has_client_identity()) {
|
||||
return Err(tls);
|
||||
}
|
||||
if let Some(error) = err.take_body_read_error() {
|
||||
return Err(PortalError::NetworkError(error).into());
|
||||
}
|
||||
if err.status == StatusCode::NOT_FOUND {
|
||||
bail!(PortalError::ConfigError("CSC config endpoint not found".to_string()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user