add extradata nil check and use make (#2129)
* add extradata nil check and use make * remove some lines
This commit is contained in:
@@ -130,13 +130,15 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
||||
Raw: []byte(resIDMatch),
|
||||
Redacted: resIDMatch,
|
||||
RawV2: []byte(resIDMatch + resSecretMatch + resSessionMatch),
|
||||
ExtraData: map[string]string{},
|
||||
ExtraData: make(map[string]string),
|
||||
}
|
||||
|
||||
if verify {
|
||||
verified, extraData, verificationErr := s.verifyMatch(ctx, resIDMatch, resSecretMatch, resSessionMatch, true)
|
||||
s1.Verified = verified
|
||||
s1.ExtraData = extraData
|
||||
if extraData != nil {
|
||||
s1.ExtraData = extraData
|
||||
}
|
||||
s1.VerificationError = verificationErr
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user