Project

General

Profile

Actions

Regression #12817

closed

PHP error when terminating OpenVPN sessions via the dashboard widget

Added by Yuri Weinstein almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
OpenVPN
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default
Affected Version:
2.6.0
Affected Architecture:
All

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

clipboard-202202170719-kvzt7.png (6.56 KB) clipboard-202202170719-kvzt7.png Yuri Weinstein, 02/17/2022 09:19 AM

Related issues

Related to Feature #12416: Support OpenVPN ``client-kill`` to terminate remote clients instead of clearing their sessionResolvedViktor Gurov

Actions
Has duplicate Bug #12825: PHP Fatal error when attempting to kill an established OVPN connection via the dashboard widgetDuplicate

Actions
Has duplicate Bug #12858: OpenVPN bug, close connection errorDuplicate

Actions
Actions #1

Updated by Viktor Gurov almost 3 years ago

  • Related to Feature #12416: Support OpenVPN ``client-kill`` to terminate remote clients instead of clearing their session added
Actions #2

Updated by Viktor Gurov almost 3 years ago

  • Tracker changed from Bug to Regression
Actions #3

Updated by Viktor Gurov almost 3 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
Actions #4

Updated by Yuri Weinstein almost 3 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?

Actions #5

Updated by Jim Pingle almost 3 years ago

  • Status changed from New to Pull Request Review
  • Target version changed from CE-Next to 2.7.0
Actions #6

Updated by Viktor Gurov almost 3 years ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #7

Updated by Viktor Gurov almost 3 years ago

Yuri Weinstein wrote in #note-4:

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?

You can install the System Patches pkg:
https://docs.netgate.com/pfsense/en/latest/development/system-patches.html

and apply patch id 3ade222beb2cae2c0681ed69d4e5a0c82c6303f9

Actions #8

Updated by Yuri Weinstein almost 3 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.
Actions #10

Updated by Yuri Weinstein almost 3 years ago

Retested again and applied the patch successfully and it fixed the issue, thank you!

Actions #11

Updated by Jim Pingle almost 3 years ago

  • Has duplicate Bug #12825: PHP Fatal error when attempting to kill an established OVPN connection via the dashboard widget added
Actions #12

Updated by Jim Pingle over 2 years ago

  • Has duplicate Bug #12858: OpenVPN bug, close connection error added
Actions #13

Updated by Christopher Cope over 2 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.

Actions #14

Updated by Jim Pingle over 2 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.

Actions

Also available in: Atom PDF