Skip to content

Commit fcba9af

Browse files
committed
[FAB-3252] improve event security check error msg
If the event message is not properly signed, the peer returns the following error: event message must be properly signed by an identity from a participating organization in any of the channels existing in the peer This is not accurate because the latest logic is only check against the local MSP, no checks against channel is done for v1.0. Change-Id: I60f0971bc755565e2cd38d507c1433b52960f1d2 Signed-off-by: Jim Zhang <[email protected]>
1 parent 3870bcf commit fcba9af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

events/producer/handler.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package producer
1818

1919
import (
20-
"errors"
2120
"fmt"
2221
"strconv"
2322

@@ -102,7 +101,7 @@ func (d *handler) deregisterAll() {
102101
func (d *handler) HandleMessage(msg *pb.SignedEvent) error {
103102
evt, err := validateEventMessage(msg)
104103
if err != nil {
105-
return errors.New("event message must be properly signed by an identitiy from a participating organization in any of the channels existing in the peer")
104+
return fmt.Errorf("event message must be properly signed by an identity from the same organization as the peer: [%s]", err)
106105
}
107106

108107
switch evt.Event.(type) {

0 commit comments

Comments
 (0)