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

reject messages claiming to be from ourselves but not locally published #484

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

mystical-prog
Copy link
Contributor

@mystical-prog mystical-prog commented Nov 6, 2024

What was wrong?

There was a missing check in push_msg function inside the pubsub module wherein we weren't rejecting messages claiming to be from ourselves but not locally published

Closes #413

How was it fixed?

I took a reference from go-libp2p-pubsub implementation and added the missing check

To-Do

  • Ran tests
  • Ran make lint
  • Added newsfragment

Cute Animal Picture

put a cute animal picture link inside the parentheses

@pacrob
Copy link
Member

pacrob commented Nov 7, 2024

Thanks, @mystical-prog ! Would it be possible to add a test showing that such a message is properly dropped?

@mystical-prog
Copy link
Contributor Author

Sure, I will add a test and get back to you.

@mystical-prog
Copy link
Contributor Author

hey @pacrob
I have added the required testcase to an existing flow - let me know if there are any changes

@pacrob
Copy link
Member

pacrob commented Nov 15, 2024

Looks good, @mystical-prog ! Thanks!

@pacrob pacrob merged commit a10b8fd into libp2p:main Nov 15, 2024
17 checks passed
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.

Pubsub should not return messages from local peer.
2 participants