Commit c8a5b64d authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Use new awitpt netip module to check validity of IPv4/6 addies

parent 31588f90
......@@ -259,7 +259,7 @@ sub protocol_validate {
# Check params
if (!defined($request->{'client_address'}) || !($request->{'client_address'} =~ /^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$/) ) {
if (!awit::netip::is_valid($request->{'client_address'})) {
my $client_address = defined($request->{'client_address'}) ? "'".$request->{'client_address'}."'" : "undef";
$server->log(LOG_DEBUG,"[PROTOCOLS/Bizanga] Error, parameter 'client_address' cannot be $client_address") if ($log);
return "Required parameter 'client_address' was not found or invalid format";
......
......@@ -236,7 +236,7 @@ sub protocol_validate {
return "required parameter 'protocol_state' was not found";
}
if (!defined($request->{'client_address'}) || !($request->{'client_address'} =~ /^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$/) ) {
if (!awit::netip::is_valid($request->{'client_address'})) {
my $client_address = defined($request->{'client_address'}) ? "'".$request->{'client_address'}."'" : "undef";
$server->log(LOG_ERR,"[PROTOCOLS/Postfix] Error, parameter 'client_address' cannot be $client_address") if ($log);
return "required parameter 'client_address' was not found or invalid format";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment