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:
1 parent
9728c24848
commit
7b3e2b006e
1 file changed
-2
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user