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:
@@ -485,7 +485,7 @@ public class ConfigManager
|
|||||||
|
|
||||||
public void setConfiguration(String groupName, String profile, String key, @NonNull String value)
|
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();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user