Skip to content

Commit decfdbd

Browse files
committed
fix(k8sjks): Remove \r and/or \n trailing characters on passwords returned from a k8s secret.
1 parent 04cfff8 commit decfdbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kubernetes-orchestrator-extension/Jobs/JobBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ protected string getK8SStorePassword(V1Secret certData)
12331233
var storePassword = Encoding.UTF8.GetString(storePasswordBytes);
12341234
Logger.LogTrace("K8S Store Password show new lines: {StorePassword}", storePassword.Replace("\n","\\n"));
12351235
// remove any trailing new line characters from the string
1236-
storePassword = storePassword.TrimEnd('\n');
1236+
storePassword = storePassword.TrimEnd('\r','\n');
12371237
Logger.LogTrace("Store password bytes converted to string: {StorePassword}",
12381238
storePassword); //TODO: INSECURE COMMENT OUT
12391239
Logger.MethodExit();

0 commit comments

Comments
 (0)