Allow ciphers in overrides via escape of '{'

This commit is contained in:
Dave Syer
2015-12-18 10:11:29 +00:00
parent 2a61e34258
commit 3951569aa2

View File

@@ -66,8 +66,11 @@ public class EnvironmentEncryptorEnvironmentRepository implements EnvironmentRep
public void setOverrides(Map<String, String> overrides) {
this.overrides = new HashMap<String, String>(overrides);
for (String key : overrides.keySet()) {
if (overrides.get(key).contains("$\\{")) {
this.overrides.put(key, overrides.get(key).replace("$\\{", "${"));
if (overrides.get(key).contains("\\{")) {
this.overrides.put(key, overrides.get(key).replace("\\{", "{"));
}
if (overrides.get(key).contains("\\${")) {
this.overrides.put(key, overrides.get(key).replace("\\${", "${"));
}
}
}