From e64e2240c0630a418ba47d5877d862f715dc7ea8 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Tue, 12 Mar 2024 12:19:33 +0100 Subject: [PATCH] Do not split Fortinet cookies on `=` As far as I know, Fortigate appliances always return a single cookie. Therefore, there is no need to attempt to split on `=` to extract the last cookie. On the contrary, some Fortigate cookies end up with `=`, and splitting on `=` results in an empty cookie. Signed-off-by: Dimitri Papadopoulos Orfanos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- fortinet.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fortinet.c b/fortinet.c index 20fc68ee..18e45515 100644 --- a/fortinet.c +++ b/fortinet.c @@ -632,13 +632,6 @@ static int fortinet_configure(struct openconnect_info *vpninfo) https://gitlab.com/openconnect/openconnect/-/issues/235#note_552995833 */ - if (!vpninfo->cookies) { - /* XX: This will happen if authentication was separate/external */ - ret = internal_split_cookies(vpninfo, 1, "SVPNCOOKIE"); - if (ret) - return ret; - } - /* Fetch the connection options in XML format */ free(vpninfo->urlpath); if (asprintf(&vpninfo->urlpath, "remote/fortisslvpn_xml%s", vpninfo->disable_ipv6 ? "" : "?dual_stack=1") < 0) { -- GitLab