Project

General

Profile

Bug #7565

openvpn and port 0

Added by Jeremy C. Reed 6 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
OpenVPN
Target version:
Start date:
05/20/2017
Due date:
% Done:

100%

Affected Version:
All
Affected Architecture:
All

Description

openvpn_validate_port() has:
if (empty($value ...

so when passing zero to it complains
(because empty(0) is FALSE):
"The field 'Local port' must contain a valid port, ranging from 0 to 65535"

While I would want it to check for not 0,
the above says zero is okay and the
vpn_openvpn_server.php addInput form for it allows it.

make fix in both places.

Associated revisions

Revision 39fed386
Added by Jim Pingle 6 months ago

Fix OpenVPN server port validation to disallow "0". 0 is still OK for client port, which is the same meaning as blank/empty. Fixes #7565

History

#1 Updated by Jim Pingle 6 months ago

  • Category changed from VPN to OpenVPN
  • Status changed from New to Assigned
  • Assignee set to Jim Pingle
  • Target version set to 2.4.0
  • Affected Version set to All
  • Affected Architecture set to All

Server shouldn't allow 0, but for clients, 0 is the same as blank/empty so that's OK. Needs to reflect the proper range for server ports.

#2 Updated by Jim Pingle 6 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#3 Updated by Jim Pingle 5 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF