mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8329: CloudStack accepts IP ends with dot
This commit is contained in:
parent
5a860fe0ae
commit
75da05068a
|
|
@ -515,6 +515,10 @@ public class NetUtils {
|
|||
}
|
||||
|
||||
public static boolean isValidIp(final String ip) {
|
||||
if (ip.endsWith(".")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final String[] ipAsList = ip.split("\\.");
|
||||
|
||||
// The IP address must have four octets
|
||||
|
|
|
|||
Loading…
Reference in New Issue