diff --git a/spice-example-sh b/spice-example-sh index 1d8bdc499..cc7c6b7f5 100755 --- a/spice-example-sh +++ b/spice-example-sh @@ -66,10 +66,12 @@ echo "AUTH OK" TICKET="${DATA//\"/}" TICKET="${TICKET##*ticket:}" TICKET="${TICKET%%,*}" +TICKET="${TICKET%%\}*}" CSRF="${DATA//\"/}" CSRF="${CSRF##*CSRFPreventionToken:}" CSRF="${CSRF%%,*}" +CSRF="${CSRF%%\}*}" curl -f -s -S -k -b "PVEAuthCookie=$TICKET" -H "CSRFPreventionToken: $CSRF" "https://$PROXY:8006/api2/spiceconfig/nodes/$NODE/qemu/$VMID/spiceproxy" -d "proxy=$PROXY" > spiceproxy