From: Michael Tremer Date: Wed, 24 Apr 2024 22:34:34 +0000 (+0200) Subject: wireguard.cgi: Allow the endpoint to be empty X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc203a41265c8ec5564be204293cf86ac9533e81;p=people%2Fstevee%2Fipfire-2.x.git wireguard.cgi: Allow the endpoint to be empty Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index 3d7e98dcf..05ea3f130 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -172,7 +172,9 @@ if ($cgiparams{"ACTION"} eq $Lang::tr{'save'}) { } # Check the endpoint address - unless (&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) { + if ($cgiparams{'ENDPOINT_ADDRESS'} eq '') { + # The endpoint address may be empty + } elsif (!&Network::check_ip_address($cgiparams{'ENDPOINT_ADDRESS'})) { push(@errormessages, $Lang::tr{'wg invalid endpoint address'}); } @@ -585,7 +587,7 @@ EDITOR: + value="$cgiparams{'ENDPOINT_ADDRESS'}" />