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

fix: verify public key exists in validator #21

Merged
merged 2 commits into from
Apr 3, 2019
Merged

Conversation

jacobheun
Copy link
Contributor

Running my local js-ipfs daemon it crashed when running the IPNS validator. Currently if the validator runs and cannot get an embedded public key it will attempt to use the public key of the peer. However, the validator doesn't have access to the peer public key, as it creates the peerId from bytes.

I'm not very familiar with the IPNS code base so there may be a better way to resolve this. This simply ensures that extractPublicKey actually returns a key.

@ghost ghost assigned jacobheun Apr 2, 2019
@ghost ghost added the status/in-progress In progress label Apr 2, 2019
Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

LGTM!

I agree that we should guarantee that we extracted the key. And send back an error otherwise

@vasco-santos
Copy link
Member

I will merge this, as the CI failing is windows constantly with no response in 10 minutes and in the CI Branch it passed.

@vasco-santos vasco-santos merged commit 602e27f into master Apr 3, 2019
@vasco-santos vasco-santos deleted the fix/validator branch April 3, 2019 11:05
@ghost ghost removed the status/in-progress In progress label Apr 3, 2019
@vasco-santos
Copy link
Member

This landed on ipns@0.5.1

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.

2 participants