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

metafeed/announce is signed by meta feed #45

Merged
merged 3 commits into from
Sep 14, 2021
Merged

Conversation

staltz
Copy link
Member

@staltz staltz commented Sep 14, 2021

@staltz staltz requested a review from arj03 September 14, 2021 10:26
@staltz
Copy link
Member Author

staltz commented Sep 14, 2021

Oh, I should probably update validation to check these sigs.

@staltz
Copy link
Member Author

staltz commented Sep 14, 2021

Oh, I should probably update validation to check these sigs.

Oh well actually metafeed/announce is published on the main feed, and we only need to validate remote peer's metafeed/announce msgs, which should happen in ssb-replication-scheduler.

So this PR is ready to go I guess

@staltz
Copy link
Member Author

staltz commented Sep 14, 2021

Or hey I can just make a new function, validateAnnounce(msg). Yes

validate.js Outdated Show resolved Hide resolved
@@ -123,7 +123,7 @@ test('seed', (t) => {
})

test('announce', (t) => {
messages.getContentAnnounce(metafeedKeys.id, (err, content) => {
messages.getContentAnnounce(metafeedKeys, (err, content) => {
Copy link
Member

Choose a reason for hiding this comment

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

There must have been a bug here before?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes there was. The checking is done correctly in test/messages.js but in this file we want to test the query APIs so we just used getContentAnnounce to create the inputs, but we didn't validate the input. Anyway whatever :)

Copy link
Member

@arj03 arj03 left a comment

Choose a reason for hiding this comment

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

Just found that minor spelling thing, otherwise looks good

@staltz staltz merged commit 62f48f3 into master Sep 14, 2021
@staltz staltz deleted the sign-metafeed-announce branch September 14, 2021 11:52
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.

None yet

2 participants