From 9ec072ff3bb99506b1caaf1388f169d5a3a04aaa Mon Sep 17 00:00:00 2001 From: Pawan Dhananjay Date: Fri, 1 Apr 2022 00:59:00 +0000 Subject: [PATCH] Strip newline from jwt secrets (#3132) ## Issue Addressed Resolves #3128 ## Proposed Changes Strip trailing newlines from jwt secret files. --- beacon_node/execution_layer/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index c962e58ae5..82baec4b09 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -187,7 +187,7 @@ impl ExecutionLayer { }) .and_then(|ref s| { let secret = JwtKey::from_slice( - &hex::decode(strip_prefix(s)) + &hex::decode(strip_prefix(s.trim_end())) .map_err(|e| format!("Invalid hex string: {:?}", e))?, )?; Ok((secret, p.to_path_buf()))