Skip to content

Commit c92e5ba

Browse files
committed
fix(backend): trim whitespace in kvp of redacted terms
1 parent ad3141a commit c92e5ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/routes/api/disclose.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ impl DiscloseServiceState {
2121

2222
fn load_kvp() -> HashMap<String, String> {
2323
let content = std::fs::read_to_string(KVP_FILEPATH)
24-
.unwrap_or_else(|e| panic!("unable to read redacted terms from {KVP_FILEPATH}: {e}"));
24+
.unwrap_or_else(|e| panic!("unable to read redacted terms from {KVP_FILEPATH}: {e}"))
25+
.trim()
26+
.to_owned();
2527
let lines: Vec<String> = content.lines().map(|v| v.into()).collect();
2628
let pairs: Vec<(String, String)> = lines
2729
.iter()

0 commit comments

Comments
 (0)