This is an automated email from the ASF dual-hosted git repository.

dahn pushed a commit to branch 4.22
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.22 by this push:
     new bc3d7c314bb Change the `value` parameter of the `updateConfiguration` 
API to be required (#10790)
bc3d7c314bb is described below

commit bc3d7c314bb61af7dfb822a644c3032ff8d5c0aa
Author: Bernardo De Marco Gonçalves <[email protected]>
AuthorDate: Fri Jan 9 05:17:44 2026 -0300

    Change the `value` parameter of the `updateConfiguration` API to be 
required (#10790)
---
 .../java/com/cloud/configuration/ConfigurationManagerImpl.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java 
b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
index 705e7dea158..e6abc21e7da 100644
--- a/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -1031,6 +1031,10 @@ public class ConfigurationManagerImpl extends 
ManagerBase implements Configurati
             category = config.getCategory();
         }
 
+        if (value == null) {
+            throw new InvalidParameterValueException(String.format("The new 
value for the [%s] configuration must be given.", name));
+        }
+
         validateIpAddressRelatedConfigValues(name, value);
         validateConflictingConfigValue(name, value);
 
@@ -1039,10 +1043,6 @@ public class ConfigurationManagerImpl extends 
ManagerBase implements Configurati
             throw new CloudRuntimeException("Only Root Admin is allowed to 
edit this configuration.");
         }
 
-        if (value == null) {
-            return _configDao.findByName(name);
-        }
-
         ConfigKey.Scope scope = null;
         Long id = null;
         int paramCountCheck = 0;

Reply via email to