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(server): isOverDataLimit logic to stop allowing 0 traffic byte #1556

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

cornzzy
Copy link
Contributor

@cornzzy cornzzy commented Jun 5, 2024

issue #1515

This if statement is just wrong and doesn't block access when traffic limit is set to 0 byte. This one character fixes it.

Now if we create a new access key, set the limit to 0 before the first usage, the client no longer will be able to connect as expected.

issue Jigsaw-Code#1515 

This if statement is just wrong and doesn't block access when traffic limit is set to 0 byte. This one character fixes it.

Now if we create a new access key, set the limit to 0 before first usage, the client no longer will be able to connect.
@cornzzy cornzzy requested a review from fortuna as a code owner June 5, 2024 06:41
@fortuna fortuna requested review from sbruens and removed request for fortuna June 5, 2024 14:46
src/shadowbox/server/server_access_key.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@sbruens sbruens left a comment

Choose a reason for hiding this comment

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

Do you mind adding or updating our tests for enforceAccessKeyDataLimits to cover this scenario (where === also disables)? That will help prevent regressions in future refactors.

@cornzzy
Copy link
Contributor Author

cornzzy commented Jul 11, 2024

I can't be a contributor. would you do it

@sbruens sbruens requested a review from fortuna July 15, 2024 14:48
@sbruens sbruens changed the title Fix isOverDataLimit logic to stop allowing 0 traffic byte fix(server): isOverDataLimit logic to stop allowing 0 traffic byte Jul 15, 2024
@sbruens
Copy link
Contributor

sbruens commented Jul 15, 2024

I can't be a contributor. would you do it

No problem. I added the requested changes to the PR.

src/shadowbox/model/access_key.ts Outdated Show resolved Hide resolved
@sbruens sbruens merged commit ee039ca into Jigsaw-Code:master Jul 24, 2024
10 checks passed
@sbruens
Copy link
Contributor

sbruens commented Jul 24, 2024

Merged and we'll try and get this released soon. Thanks again for your contribution @cornzzy!

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

3 participants