Skip to content

Commit 542a01a

Browse files
authored
YAML fix should handle more than just {cipher} strings
The invalid YAML can be caused by any string starting with a {, not just {cipher} Signed-off-by: Zachary Sistrunk <zachary@sistrunk.dev>
1 parent f715bbb commit 542a01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/environment/EnvironmentController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public ResponseEntity<String> labelledYaml(@PathVariable String name, @PathVaria
228228

229229
if (resolvePlaceholders) {
230230
yaml = resolvePlaceholders(prepareEnvironment(environment), yaml);
231-
yaml = yaml.replaceAll(": \\{cipher}([0-9a-f]+)", ": '{cipher}$1'");
231+
yaml = yaml.replaceAll(": \\{(.+)", ": '{$1'");
232232
}
233233

234234
return getSuccess(yaml);

0 commit comments

Comments
 (0)