config manager: disallow : in key names

The config service rewrites . -> : and : -> . for storage since mongodb
does not support . in field names. This causes any keys set with : to
get changed after going to the config service and back.
This commit is contained in:
Adam
2021-06-05 10:26:18 -04:00
parent 879e3ce737
commit d3a2e4bbc2

View File

@@ -485,7 +485,7 @@ public class ConfigManager
public void setConfiguration(String groupName, String profile, String key, @NonNull String value)
{
if (Strings.isNullOrEmpty(groupName) || Strings.isNullOrEmpty(key))
if (Strings.isNullOrEmpty(groupName) || Strings.isNullOrEmpty(key) || key.indexOf(':') != -1)
{
throw new IllegalArgumentException();
}