Skip to content

Commit

Permalink
Merge "[FAB-2341] Fix validation logic with empty CodePackage"
Browse files Browse the repository at this point in the history
  • Loading branch information
binhn authored and Gerrit Code Review committed Feb 17, 2017
2 parents 5316561 + d4b5649 commit 7e35a64
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/chaincode/platforms/golang/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ func (goPlatform *Platform) ValidateSpec(spec *pb.ChaincodeSpec) error {

func (goPlatform *Platform) ValidateDeploymentSpec(cds *pb.ChaincodeDeploymentSpec) error {

if cds.CodePackage == nil || len(cds.CodePackage) == 0 {
// Nothing to validate if no CodePackage was included
return nil
}

// FAB-2122: Scan the provided tarball to ensure it only contains source-code under
// /src/$packagename. We do not want to allow something like ./pkg/shady.a to be installed under
// $GOPATH within the container. Note, we do not look deeper than the path at this time
Expand Down

0 comments on commit 7e35a64

Please sign in to comment.