diff --git a/network/message/handler.go b/network/message/handler.go index 5a83f1f3652d65d8d5ffa7a93e6369d2c9dfcc14..093287d4e53be644a8011a2428061ca4cd7dd219 100644 --- a/network/message/handler.go +++ b/network/message/handler.go @@ -54,17 +54,18 @@ func (m *Manager) handleMessage(ecrMsg format.Message, bundle Bundle, edge *edge var relationshipFingerprint []byte //if it exists, check against all in the list - has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), append([]byte{0}, ecrMsg.GetContents()...)) + modifiedContents := append([]byte{0}, ecrMsg.GetContents()...) + has, forMe, _ := m.Session.GetEdge().Check(identity.Source, ecrMsg.GetIdentityFP(), modifiedContents) if !has { jww.INFO.Printf("checking backup %v", preimage.MakeDefault(identity.Source)) //if it doesnt exist, check against the default fingerprint for the identity forMe = fingerprint2.CheckIdentityFP(ecrMsg.GetIdentityFP(), - ecrMsg.GetContents(), preimage.MakeDefault(identity.Source)) + modifiedContents, preimage.MakeDefault(identity.Source)) } if !forMe { if jww.GetLogThreshold() == jww.LevelTrace { - expectedFP := fingerprint2.IdentityFP(ecrMsg.GetContents(), + expectedFP := fingerprint2.IdentityFP(modifiedContents, preimage.MakeDefault(identity.Source)) jww.TRACE.Printf("Message for %d (%s) failed identity "+ "check: %v (expected-default) vs %v (received)", identity.EphId,