Project

General

Profile

Bug #11311

Listen and peer port validation in wg.inc

Added by John Clark about 1 month ago. Updated 27 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
VPN (Multiple Types)
Target version:
Start date:
01/25/2021
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:

Description

The listen port in function wg_validate_post and the peer port in function wg_validate_peer do not appear to be validated correctly. Just about any text can be entered and accepted. This could be an issue with form field validation elsewhere, but something along the lines of the following code might help....

if (empty($lport) || !ctype_digit ($lport) || !in_array ((int) $lport, range (0, 65535)))

Associated revisions

Revision 0a0ef335 (diff)
Added by Jim Pingle about 1 month ago

Improve WireGuard port validation. Fixes #11311

History

#1 Updated by Jim Pingle about 1 month ago

  • Assignee set to Jim Pingle
  • Target version set to 2.5.0
  • Affected Version set to 2.5.0

#2 Updated by Jim Pingle about 1 month ago

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

#3 Updated by Max Leighton 27 days ago

  • Status changed from Feedback to Resolved

Tested on the latest 2.5 image. It's working as expected. I'll mark it as resolved.

Also available in: Atom PDF