Regression #12817
closedPHP error when terminating OpenVPN sessions via the dashboard widget
100%
Description
If a user clicks on x next to the session on the OpenVPN dashboard widget as here

PHP ERROR is thrown and this functionality is broken
PHP errors
PHP ERROR: Type: 1, File: /etc/inc/openvpn.inc, Line: 2106, Message: Uncaught ArgumentCountError: Too few arguments to function openvpn_kill_client(), 2 passed in /usr/local/www/widgets/widgets/openvpn.widget.php on line 285 and exactly 3 expected in /etc/inc/openvpn.inc:2106
Stack trace:
#0 /usr/local/www/widgets/widgets/openvpn.widget.php(285): openvpn_kill_client('server1', '192.168.70.13:4...')
#1 {main}
thrown @ 2022-02-17 07:15:22
Files
Related issues
Updated by Viktor Gurov over 4 years ago
- Related to Feature #12416: Support OpenVPN ``client-kill`` to terminate remote clients instead of clearing their session added
Updated by Viktor Gurov over 4 years ago
- Assignee set to Viktor Gurov
- Target version set to CE-Next
- Plus Target Version set to 22.05
- Affected Version set to 2.6.0
Updated by Yuri Weinstein over 4 years ago
Viktor Gurov wrote in #note-3:
fix:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/628
Thx for the quick fix @Viktor
Any way to apply it as a patch to the current version till it's merged ib=nto the next point release?
Updated by Jim Pingle over 4 years ago
- Status changed from New to Pull Request Review
- Target version changed from CE-Next to 2.7.0
Updated by Viktor Gurov over 4 years ago
- Status changed from Pull Request Review to Feedback
- % Done changed from 0 to 100
Applied in changeset commit:3ade222beb2cae2c0681ed69d4e5a0c82c6303f9.
Updated by Viktor Gurov over 4 years ago
Yuri Weinstein wrote in #note-4:
Viktor Gurov wrote in #note-3:
fix:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/628Thx for the quick fix @Viktor
Any way to apply it as a patch to the current version till it's merged ib=nto the next point release?
You can install the System Patches pkg:
https://docs.netgate.com/pfsense/en/latest/development/system-patches.html
and apply patch id 3ade222beb2cae2c0681ed69d4e5a0c82c6303f9
Updated by Yuri Weinstein over 4 years ago
@Viktor
Thx a million!
But I could not apply it:
Patch Test Output apply:
/usr/bin/patch --directory=/ -t -p2 -i /var/patches/620ebb1139990.patch --check --forward --ignore-whitespace Hmm... I can't seem to find a patch in there anywhere.
Updated by Yuri Weinstein over 4 years ago
Retested again and applied the patch successfully and it fixed the issue, thank you!
Updated by Jim Pingle over 4 years ago
- Has duplicate Bug #12825: PHP Fatal error when attempting to kill an established OVPN connection via the dashboard widget added
Updated by Jim Pingle over 4 years ago
- Has duplicate Bug #12858: OpenVPN bug, close connection error added
Updated by Christopher Cope over 4 years ago
- Status changed from Feedback to Resolved
Tested on
22.05-DEVELOPMENT (amd64) built on Tue Mar 08 06:20:23 UTC 2022 FreeBSD 12.3-STABLE
Both kill and halt functioning as expected. Marked as resolved.
Updated by Jim Pingle over 4 years ago
- Subject changed from Killing OpenVPN session via the dashboard widget is broken in 2.6.0 to PHP error when terminating OpenVPN sessions via the dashboard widget
Updating subject for release notes.
Also available in: Atom