mirror of
https://github.com/prometheus/alertmanager
synced 2025-02-16 10:37:09 +00:00
Newlines in smtp password file are now ignored
This commit is contained in:
parent
f92a08d073
commit
4271a77bd0
@ -368,7 +368,7 @@ func (n *Email) getPassword() (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("could not read %s: %w", n.conf.AuthPasswordFile, err)
|
return "", fmt.Errorf("could not read %s: %w", n.conf.AuthPasswordFile, err)
|
||||||
}
|
}
|
||||||
return string(content), nil
|
return strings.TrimSpace(string(content)), nil
|
||||||
}
|
}
|
||||||
return string(n.conf.AuthPassword), nil
|
return string(n.conf.AuthPassword), nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user