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

Make wireclient.Conn.Login more robust #52

Merged
merged 6 commits into from
Oct 8, 2024
Merged

Make wireclient.Conn.Login more robust #52

merged 6 commits into from
Oct 8, 2024

Conversation

chilagrow
Copy link
Member

No description provided.

@chilagrow chilagrow added the code/chore Code maintenance improvements label Oct 2, 2024
@chilagrow chilagrow self-assigned this Oct 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2024

Codecov Report

Attention: Patch coverage is 47.72727% with 23 lines in your changes missing coverage. Please review.

Project coverage is 65.33%. Comparing base (2a9c602) to head (f4c4e9c).

Files with missing lines Patch % Lines
wireclient/wireclient.go 46.15% 13 Missing and 8 partials ⚠️
op_msg.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
- Coverage   65.75%   65.33%   -0.43%     
==========================================
  Files          41       41              
  Lines        1799     1829      +30     
==========================================
+ Hits         1183     1195      +12     
- Misses        446      458      +12     
- Partials      170      176       +6     
Files with missing lines Coverage Δ
op_msg.go 73.01% <60.00%> (-0.36%) ⬇️
wireclient/wireclient.go 56.43% <46.15%> (-2.33%) ⬇️

... and 1 file with indirect coverage changes

Flag Coverage Δ
test 65.33% <47.72%> (-0.43%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@chilagrow chilagrow marked this pull request as ready for review October 2, 2024 09:10
@chilagrow chilagrow requested a review from AlekSi as a code owner October 2, 2024 09:10
Comment on lines 342 to 345
// when `saslContinue` is called twice the SCRAM client conversation is
// completed before the second `saslContinue` request,
// ensure to move only the incomplete conversation forward
if !conv.Done() {
Copy link
Member

Choose a reason for hiding this comment

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

That was a bit that bothered me for so long. Is is kinda like "are we done yet? if not, try again" logic. But with authentication it should be stricter that that

@AlekSi AlekSi changed the title Make wireclient login handle incomplete conversation Make wireclient.Conn.Login more robust Oct 8, 2024
@AlekSi AlekSi merged commit 354271a into main Oct 8, 2024
7 of 9 checks passed
@AlekSi AlekSi deleted the fix-login branch October 8, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants