Skip to content

Commit

Permalink
Handle newlines in secret
Browse files Browse the repository at this point in the history
  • Loading branch information
cromefire authored Oct 25, 2024
1 parent 523136c commit 46c7650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func readSecret(envName string) string {
if err != nil {
slog.Error("Failed to read secret from file "+passwordFilePath, logging.ErrorAttr(err))
} else {
secret = string(content)
secret = strings.TrimSuffix(strings.TrimSuffix(string(content), "\r\n"), "\n")
}
}
return secret
Expand Down

0 comments on commit 46c7650

Please sign in to comment.