Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INDY-1148] It's possible to create several nodes with the same alias #554

Merged
merged 3 commits into from
Mar 5, 2018

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented Mar 5, 2018

add dynamic validation of alias and test

Signed-off-by: toktar [email protected]

@evernym-ci
Copy link
Contributor

Can one of the admins verify this patch?

@ghost
Copy link

ghost commented Mar 5, 2018

Could one of the committers please verify this patch?

@ashcherbakov
Copy link
Contributor

Test this please

curNodeData = self.stateSerializer.deserialize(curNodeData)
if nodeAlias == curNodeData.get(
ALIAS) and nodeNym.encode() != curNodeNym:
return "Alias " + curNodeData.get(ALIAS) + " already exists"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic should be put into PoolRequestHandler.isNodeDataConflicting method.

@Toktar Toktar force-pushed the bugfix-1148-unique-alias branch from 60e397c to 42e62d2 Compare March 5, 2018 10:31
@jovfer
Copy link
Contributor

jovfer commented Mar 5, 2018

Test this please

@@ -80,7 +80,8 @@ def authErrorWhileAddingNode(self, request):
origin)
if self.stewardHasNode(origin):
return "{} already has a node".format(origin)
if self.isNodeDataConflicting(operation.get(DATA, {})):
if self.isNodeDataConflicting(
operation.get(DATA, request.operation.get(TARGET_NYM))):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this change?

Toktar added 3 commits March 5, 2018 15:10
… - add dynamic validation of alias and test

Signed-off-by: toktar <[email protected]>
… - put alias validation into PoolRequestHandler.isNodeDataConflicting

Signed-off-by: toktar <[email protected]>
… - change validation in pool_req_handler.

Signed-off-by: toktar <[email protected]>
@Toktar Toktar force-pushed the bugfix-1148-unique-alias branch from dcdf496 to 366ca07 Compare March 5, 2018 12:11
@spivachuk
Copy link
Contributor

test this please

@Toktar Toktar changed the title INDY-1148 - It's possible to create several nodes with the same alias… INDY-1148 - It's possible to create several nodes with the same alias Mar 5, 2018
@Toktar Toktar changed the title INDY-1148 - It's possible to create several nodes with the same alias [INDY-1148] It's possible to create several nodes with the same alias Mar 5, 2018
@andkononykhin andkononykhin merged commit ee920ce into hyperledger:master Mar 5, 2018
lampkin-diet pushed a commit to lampkin-diet/indy-plenum that referenced this pull request Apr 9, 2018
…hyperledger#554)

add dynamic validation of alias and test

Signed-off-by: toktar <[email protected]>

put alias validation into PoolRequestHandler.isNodeDataConflicting

Signed-off-by: toktar <[email protected]>

change validation in pool_req_handler.

Signed-off-by: toktar <[email protected]>
lampkin-diet pushed a commit to lampkin-diet/indy-plenum that referenced this pull request Apr 10, 2018
…hyperledger#554)

add dynamic validation of alias and test

Signed-off-by: toktar <[email protected]>

put alias validation into PoolRequestHandler.isNodeDataConflicting

Signed-off-by: toktar <[email protected]>

change validation in pool_req_handler.

Signed-off-by: toktar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants