ceph: Do not log sensitive information in debug mode

Fix security issues identified by TrailOfBits:
Logging of sensitive information in debug mode

Problematic debug lines which can contain sensitive data have been removed

Resolves: #4568

Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
This commit is contained in:
Juan Miguel Olmo Martínez committed 2020-01-03 17:16:25 +01:00
1 parent 9728c24848
commit 7b3e2b006e
1 file changed
-2
-2
View File
@@ -22,13 +22,11 @@ import (
// grep finds the *first* line that matches, rather than multiple lines
func Grep(input, searchFor string) string {
logger.Debugf("grep. search=%s, input=%s", searchFor, input)
if input == "" || searchFor == "" {
return ""
}
for _, line := range strings.Split(input, "\n") {
if matched, _ := regexp.MatchString(searchFor, line); matched {
logger.Debugf("grep found line: %s", line)
return line
}
}