Fix ip address validation in POST /server
This commit is contained in:
parent
3a213de233
commit
fbc9438e91
@ -29,7 +29,9 @@ public final class POSTServers implements Handler<RoutingContext> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IpUtils.isValidIp(ip)) {
|
String ipHost = ip.split(":")[0];
|
||||||
|
|
||||||
|
if (!IpUtils.isValidIp(ipHost)) {
|
||||||
ErrorUtils.respondInvalidInput(ctx, "Ip address \"" + ip + "\" is not valid.");
|
ErrorUtils.respondInvalidInput(ctx, "Ip address \"" + ip + "\" is not valid.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user