Skip to content

Commit

Permalink
Unset sensitive environment variables after reading them
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Aug 13, 2022
1 parent b493ba7 commit 14210d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/configuration/sources/env/openvpn.go
Expand Up @@ -11,7 +11,8 @@ import (
func (r *Reader) readOpenVPN() (
openVPN settings.OpenVPN, err error) {
defer func() {
err = unsetEnvKeys([]string{"OPENVPN_CLIENTKEY", "OPENVPN_CLIENTCRT"}, err)
err = unsetEnvKeys([]string{"OPENVPN_CLIENTKEY", "OPENVPN_CLIENTCRT",
"OPENVPN_KEY_PASSPHRASE", "OPENVPN_ENCRYPTED_KEY"}, err)
}()

openVPN.Version = getCleanedEnv("OPENVPN_VERSION")
Expand Down

0 comments on commit 14210d9

Please sign in to comment.