10000 Add output buffer limiting for unauthenticated clients by uriyage · Pull Request #1994 · valkey-io/valkey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add output buffer limiting for unauthenticated clients #1994

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

Merged
merged 3 commits into from
Apr 23, 2025

Conversation

uriyage
Copy link
Contributor
@uriyage uriyage commented Apr 23, 2025

This commit introduces a mechanism to track client authentication state with a new ever_authenticated flag. It refactors client authentication handling by adding a clientSetUser function that properly sets both the authenticated and ever_authenticated flags.

The implementation limits output buffer size for clients that have never been authenticated.

Added tests to verify the output buffer limiting behavior for unauthenticated clients.

This commit introduces a mechanism to track client authentication state
with a new ever_authenticated flag. It refactors client authentication
handling by adding a clientSetUser function that properly sets both the
authenticated and ever_authenticated flags.

The implementation limits output buffer size for clients that have never
been authenticated.

Added tests to verify the output buffer limiting behavior for
unauthenticated clients.

Signed-off-by: Uri Yagelnik <uriy@amazon.com>
Copy link
Contributor
@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Just repeating what clang-format said. The remaining failures are fixed in other PRs that we will backport, or at least not related to this fix.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Copy link
codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.06%. Comparing base (b333860) to head (719d852).
Report is 1 commits behind head on 8.1.

Files with missing lines Patch % Lines
src/module.c 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.1    #1994      +/-   ##
==========================================
+ Coverage   71.03%   71.06%   +0.03%     
==========================================
  Files         123      123              
  Lines       65787    65797      +10     
==========================================
+ Hits        46734    46761      +27     
+ Misses      19053    19036      -17     
Files with missing lines Coverage Δ
src/acl.c 90.70% <100.00%> (-0.01%) ⬇️
src/debug.c 53.46% <100.00%> (+0.12%) ⬆️
src/networking.c 88.67% <100.00%> (+0.03%) ⬆️
src/replication.c 87.22% <100.00%> (+0.04%) ⬆️
src/server.c 87.91% <100.00%> (+<0.01%) ⬆️
src/server.h 100.00% <ø> (ø)
src/module.c 9.60% <0.00%> (+<0.01%) ⬆️

... and 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
@zuiderkwast zuiderkwast merged commit fff628e into valkey-io:8.1 Apr 23, 2025
63 of 65 checks passed
ranshid pushed a commit to ranshid/valkey that referenced this pull request Apr 25, 2025
This commit introduces a mechanism to track client authentication state
with a new `ever_authenticated` flag. It refactors client authentication
handling by adding a `clientSetUser` function that properly sets both
the `authenticated` and `ever_authenticated` flags.

The implementation limits output buffer size for clients that have never
been authenticated.

Added tests to verify the output buffer limiting behavior for
unauthenticated clients.

---------

Signed-off-by: Uri Yagelnik <uriy@amazon.com>
Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
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.

2 participants
0