Fix ip address validation in POST /server

This commit is contained in:
Colin McDonald 2016-07-13 23:56:17 -04:00
parent 3a213de233
commit fbc9438e91

View File

@ -29,7 +29,9 @@ public final class POSTServers implements Handler<RoutingContext> {
return;
}
if (!IpUtils.isValidIp(ip)) {
String ipHost = ip.split(":")[0];
if (!IpUtils.isValidIp(ipHost)) {
ErrorUtils.respondInvalidInput(ctx, "Ip address \"" + ip + "\" is not valid.");
return;
}