mirror of https://github.com/apache/cloudstack.git
putting a check for domain name list
This commit is contained in:
parent
46be774ce8
commit
70b9769bd5
|
|
@ -1187,6 +1187,13 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
|
||||
// add the domain prefix list to details if not null
|
||||
if (domainSuffixList != null){
|
||||
for(String dom : domainSuffixList){
|
||||
if (!NetUtils.verifyDomainName(dom)) {
|
||||
throw new InvalidParameterValueException(
|
||||
"Invalid network domain suffixes. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', "
|
||||
+ "and the hyphen ('-'); can't start or end with \"-\"");
|
||||
}
|
||||
}
|
||||
newDetails.put("dns.suffixes", StringUtils.join(domainSuffixList, ","));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue