-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-5207] Check channel create channelID mismatch
The flow for channel creation works loosely as follows. 1. Look up channel resources by channelID from ChannelHeader 2. If missing, propose a new channel, based on the config update 3. Extract the channel ID from the config update, create a template config from the consortium definition, and check if the config update satisfies the channel creation policy. 4. Add the new channel resources to the channels map. The problem is that between step 1/2 if the channelID is mismatched, the internal channel construction logic will believe it is building channelInner, while externally, this channel gets registered as channelOuter. Thus, it is possible to replay a channel creation TX by modifying the outer header. The new channel will be somewhat broken and all configuration updates against it will fail. This CR adds a simple check to verify that the ChannelHeader ChannelID matches the ConfigUpdate channelID. Change-Id: I23b088563016e0aa9f30524887c3c3d49b5942fb Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
- Loading branch information
Jason Yellick
committed
Jul 7, 2017
1 parent
9d159a7
commit 4709b33
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters