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/backend/block login spamming #338

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

waveyboym
Copy link
Member

@waveyboym waveyboym commented Aug 23, 2024

Description

This pr introduces a feature that will block users from making more than a specified amount of logins per day. This will further enhance overall security of the system by additionally preventing abuse

Fixes # (issue)
#311

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Wrote some passing unit tests to prove the correctness of code
  • Tested with postman to ensure that logins are indeed capped to 5 per day

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@waveyboym waveyboym added type: feature A new feature type: security This is a security related issue/pr type: testing This affects one or more tests For: api This is mainly for the api For: backend This is mainly for the backend code priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed effort: 5 This may require/required hours of work platform: mobile This is related to mobile platforms platform: web/desktop This is related to web/desktop platforms For: deployment This will affect our deployed system labels Aug 23, 2024
@waveyboym waveyboym added this to the Week 1 Sprint 4 milestone Aug 23, 2024
@waveyboym waveyboym self-assigned this Aug 23, 2024
@waveyboym waveyboym linked an issue Aug 23, 2024 that may be closed by this pull request
1 task
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 74.07407% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.39%. Comparing base (be356ee) to head (568995b).
Report is 9 commits behind head on develop.

Files Patch % Lines
occupi-backend/pkg/cache/cache.go 72.00% 4 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (be356ee) and HEAD (568995b). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (be356ee) HEAD (568995b)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #338      +/-   ##
===========================================
- Coverage    79.53%   74.39%   -5.15%     
===========================================
  Files           53       10      -43     
  Lines         3260     2011    -1249     
  Branches        81        0      -81     
===========================================
- Hits          2593     1496    -1097     
+ Misses         578      464     -114     
+ Partials        89       51      -38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@waveyboym waveyboym merged commit af2ac3a into develop Aug 23, 2024
5 of 7 checks passed
@waveyboym waveyboym deleted the feat/backend/block-login-spamming branch August 23, 2024 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: 5 This may require/required hours of work For: api This is mainly for the api For: backend This is mainly for the backend code For: deployment This will affect our deployed system platform: mobile This is related to mobile platforms platform: web/desktop This is related to web/desktop platforms priority: medium This does/did not need to be addressed soon but should have plans in place to be addressed type: feature A new feature type: security This is a security related issue/pr type: testing This affects one or more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK] Block accounts that location spam login
1 participant