]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
csd-wrapper: remove trailing part from URL
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 15 Jun 2024 12:32:23 +0000 (14:32 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 15 Jun 2024 13:07:28 +0000 (15:07 +0200)
The Cisco ASA server I use got some update.
It suddenly stopped providing the reply:
<host-scan-base-uri>/CACHE</host-scan-base-uri>
and went back to the legacy reply:
<csdLinux
stuburl="/CACHE/sdesktop/install/binaries/sfinst"
starturl="/CACHE/sdesktop/install/result.htm"
waiturl="/+CSCOE+/sdesktop/wait.html"
/>

The csd-wrapper now receives in the command line
-url https://server/CACHE/sdesktop/install/result.htm
instead of
-url https://server/CACHE
and, obviously, the concatenation of $URL within the script makes
impossible to download the manifest.

Strip away the trailing "/sdesktop/*" from $URL.
This should work even in case of custom path in the ASA server.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
trojans/csd-wrapper.sh

index 96d7956d969977d0151d5d5f64e61f4e7774baaf..13b966406d2e87f3c4c15f1c8300616155b190fa 100755 (executable)
@@ -62,6 +62,8 @@ while [ "$1" ]; do
     shift
 done
 
+URL=$(echo $URL | sed 's,/sdesktop/.*,,')
+
 OS="$(uname -s)"
 ARCH="$(uname -m)"