Skip to content

Commit

Permalink
[FAB-3252] improve event security check error msg
Browse files Browse the repository at this point in the history
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 <jzhang@us.ibm.com>
  • Loading branch information
jimthematrix committed Apr 19, 2017
1 parent 3870bcf commit fcba9af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions events/producer/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package producer

import (
"errors"
"fmt"
"strconv"

Expand Down Expand Up @@ -102,7 +101,7 @@ func (d *handler) deregisterAll() {
func (d *handler) HandleMessage(msg *pb.SignedEvent) error {
evt, err := validateEventMessage(msg)
if err != nil {
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")
return fmt.Errorf("event message must be properly signed by an identity from the same organization as the peer: [%s]", err)
}

switch evt.Event.(type) {
Expand Down

0 comments on commit fcba9af

Please sign in to comment.