mirror of https://github.com/apache/cloudstack.git
checking domain list syntax
This commit is contained in:
parent
f6303c13fb
commit
bf0e761be1
|
|
@ -1187,9 +1187,16 @@ public class ConfigurationManagerImpl implements ConfigurationManager, Configura
|
|||
|
||||
// add the domain prefix list to details if not null
|
||||
if (dnsSearchOrder != null){
|
||||
for(String dom : dnsSearchOrder){
|
||||
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(ZoneConfig.DnsSearchOrder.getName(), StringUtils.join(dnsSearchOrder, ","));
|
||||
}
|
||||
|
||||
|
||||
if (userId == null) {
|
||||
userId = Long.valueOf(User.UID_SYSTEM);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue