@@ -670,9 +670,6 @@ public void setKubernetesServiceHelpers(final List<KubernetesServiceHelper> kube
670670 private static final ConfigKey <Boolean > AllowDeployVmIfGivenHostFails = new ConfigKey <Boolean >("Advanced" , Boolean .class , "allow.deploy.vm.if.deploy.on.given.host.fails" , "false" ,
671671 "allow vm to deploy on different host if vm fails to deploy on the given host " , true );
672672
673- private static final ConfigKey <Boolean > EnableAdditionalVmConfig = new ConfigKey <>("Advanced" , Boolean .class ,
674- "enable.additional.vm.configuration" , "false" , "allow additional arbitrary configuration to vm" , true , ConfigKey .Scope .Account );
675-
676673 private static final ConfigKey <String > KvmAdditionalConfigAllowList = new ConfigKey <>(String .class ,
677674 "allow.additional.vm.configuration.list.kvm" , "Advanced" , "" , "Comma separated list of allowed additional configuration options." , true , ConfigKey .Scope .Account , null , null , EnableAdditionalVmConfig .key (), null , null , ConfigKey .Kind .CSV , null );
678675
@@ -6280,7 +6277,7 @@ public UserVm createVirtualMachine(DeployVMCmd cmd) throws InsufficientCapacityE
62806277 protected void persistExtraConfigVmware (String decodedUrl , UserVm vm ) {
62816278 boolean isValidConfig = isValidKeyValuePair (decodedUrl );
62826279 if (isValidConfig ) {
6283- String [] extraConfigs = decodedUrl .split ("\\ r?\\ n" );
6280+ String [] extraConfigs = decodedUrl .split ("\\ r?\\ n+ " );
62846281 for (String cfg : extraConfigs ) {
62856282 // Validate cfg against unsupported operations set by admin here
62866283 String [] allowedKeyList = VmwareAdditionalConfigAllowList .value ().split ("," );
@@ -6308,7 +6305,7 @@ protected void persistExtraConfigVmware(String decodedUrl, UserVm vm) {
63086305 protected void persistExtraConfigXenServer (String decodedUrl , UserVm vm ) {
63096306 boolean isValidConfig = isValidKeyValuePair (decodedUrl );
63106307 if (isValidConfig ) {
6311- String [] extraConfigs = decodedUrl .split ("\\ r?\\ n" );
6308+ String [] extraConfigs = decodedUrl .split ("\\ r?\\ n+ " );
63126309 int i = 1 ;
63136310 String extraConfigKey = ApiConstants .EXTRA_CONFIG + "-" ;
63146311 for (String cfg : extraConfigs ) {
@@ -6388,8 +6385,8 @@ protected void persistExtraConfigKvm(String decodedUrl, UserVm vm) {
63886385 // validate config against denied cfg commands
63896386 validateKvmExtraConfig (decodedUrl , vm .getAccountId ());
63906387 String [] extraConfigs = decodedUrl .split ("\n \n " );
6388+ int i = 1 ;
63916389 for (String cfg : extraConfigs ) {
6392- int i = 1 ;
63936390 String [] cfgParts = cfg .split ("\n " );
63946391 String extraConfigKey = ApiConstants .EXTRA_CONFIG ;
63956392 String extraConfigValue ;
0 commit comments