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

feat: Implemented Rate Limiter against Message Flooding. #529

Merged
merged 5 commits into from
Oct 22, 2023
Merged

feat: Implemented Rate Limiter against Message Flooding. #529

merged 5 commits into from
Oct 22, 2023

Conversation

Tholkappiar
Copy link
Contributor

Fixes Issue

My PR closes #470

πŸ‘¨β€πŸ’» Changes proposed(What did you do ?)

Implemented Rate Limiter against Message Flooding.

βœ”οΈ Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.

Note to reviewers

When the user send 25 messages within a minute this will limit or block the messages - for message flooding and spamming

πŸ“· Screenshots

Screenshot (87)

@vercel
Copy link

vercel bot commented Oct 22, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @Dun-sin on Vercel.

@Dun-sin first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 22, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
whisper βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 22, 2023 6:09am

Copy link
Owner

@Dun-sin Dun-sin left a comment

Choose a reason for hiding this comment

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

you need to also prevent the user from sending a text in the frontend until the limit resets

server/sockets/sendMessage.js Outdated Show resolved Hide resolved
server/sockets/sendMessage.js Outdated Show resolved Hide resolved
server/sockets/sendMessage.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@Tholkappiar Tholkappiar left a comment

Choose a reason for hiding this comment

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

Just updated the changes , reverted back the previous code which do not fall on my scope , don't know why some changes are only visible in the remote ! Please kindly review the changes !

@Dun-sin
Copy link
Owner

Dun-sin commented Oct 22, 2023

you need to also prevent the user from sending a text in the frontend until the limit resets

@Tholkappiar

Tholkappiar

This comment was marked as duplicate.

Copy link
Contributor Author

@Tholkappiar Tholkappiar left a comment

Choose a reason for hiding this comment

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

Hey Hello , just implemented the limiter in the frontend part , only changed my issue code , dont know why git says i updated all , kindly check the work which nearly got 3 hrs to update , kindly give the feedback .If all good kindly add up the hacktoberfest things .Thank you !

Copy link
Owner

@Dun-sin Dun-sin left a comment

Choose a reason for hiding this comment

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

You did great, thanks for contributing, I hope you will stick around and continue to contribute to this project.

Consider giving this project a star and joining the community discord server if you haven't for more resources and opportunities to connect with others. πŸ‘‰πŸ½hereπŸ‘ˆπŸ½

@Dun-sin Dun-sin merged commit 824ee22 into Dun-sin:main Oct 22, 2023
1 of 2 checks passed
@Dun-sin Dun-sin changed the title fix: Implemented Rate Limiter against Message Flooding. feat: Implemented Rate Limiter against Message Flooding. Oct 22, 2023
@Tholkappiar
Copy link
Contributor Author

Tholkappiar commented Oct 22, 2023

Could you pls add the hactoberfest accepted labels for me ! And thanks Learned many things Today !

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.

Implement Rate Limiting for Messages.
2 participants