mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-12-05 03:25:21 -05:00
fix(gpclient): honor the requested username when reusing cookies (#732)
This commit is contained in:
1 parent
69155d04b9
commit
fe3125ec61
3 files changed
+65
-8
No files matched your search
@@ -83,7 +83,7 @@ impl ConnectHandler<'_> {
|
||||
pub(super) async fn try_cached_cookie(&self, server: &str) -> Option<anyhow::Result<()>> {
|
||||
let path = cookie_cache_path(self.args)?;
|
||||
let host_id = self.os_profile.borrow().host_identity().host_id().to_string();
|
||||
let stored = cookie_store::load(&path, server, &host_id)?;
|
||||
let stored = cookie_store::load(&path, server, &host_id, self.args.user.as_deref())?;
|
||||
if !stored.auth_cookie.can_authenticate_gateway() {
|
||||
cookie_store::clear(&path);
|
||||
return None;
|
||||
@@ -145,7 +145,7 @@ impl ConnectHandler<'_> {
|
||||
}
|
||||
let path = cookie_cache_path(self.args)?;
|
||||
let host_id = self.os_profile.borrow().host_identity().host_id().to_string();
|
||||
let stored = cookie_store::load(&path, server, &host_id)?;
|
||||
let stored = cookie_store::load(&path, server, &host_id, self.args.user.as_deref())?;
|
||||
if !stored.auth_cookie.can_authenticate_gateway() {
|
||||
cookie_store::clear(&path);
|
||||
return None;
|
||||
|
||||
Reference in new issue
Block a user