Skip to content

vpnc-script-win.js: incorrect exec() call on reason "disconnect"

The code in vpnc-script-win.js that handles the "disconnect" reason and deletes legacy IP split-exclude routes still issues an incorrect exec() call. This should instead be a run() call like in all other places throughout the script. The incorrect call causes the following error when the OpenConnect client runs the script on disconnect:

Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Users\tdebaets\Documents\Projecten\Other\vpnc-scripts\vpnc-script-win.js(226, 13) Microsoft JScript runtime error: Object expected

Note that the client currently never runs this script on disconnect due to bug openconnect#362 (closed), which is probably why this script error stayed unnoticed for so long. openconnect!323 (merged) is required to be able to reproduce the error.

Merge request reports