Remove senstive encryption entries from event data (#7719)

Fixes #7716
This commit is contained in:
Praveen raj Mani 2019-05-30 10:59:37 +05:30 committed by Harshavardhana
parent 2c0b3cadfc
commit a73da7755e
1 changed files with 6 additions and 0 deletions

View File

@ -31,6 +31,7 @@ import (
"sync"
"time"
"github.com/minio/minio/cmd/crypto"
"github.com/minio/minio/cmd/logger"
"github.com/minio/minio/pkg/event"
xnet "github.com/minio/minio/pkg/net"
@ -910,6 +911,11 @@ func (args eventArgs) ToEvent() event.Event {
}
func sendEvent(args eventArgs) {
// remove sensitive encryption entries in metadata.
crypto.RemoveSensitiveEntries(args.Object.UserDefined)
crypto.RemoveInternalEntries(args.Object.UserDefined)
// globalNotificationSys is not initialized in gateway mode.
if globalNotificationSys == nil {
return