Skip to content

Conversation

@ramnes
Copy link
Contributor

@ramnes ramnes commented Dec 10, 2025

Without this PR, the using password: NO appears when the user password on the server is empty. It should be the opposite: the YES or NO should depend on the data sent by the client, not the password stored for the user.

@ramnes ramnes changed the title ramnes/no password Send using password: NO when no password is used Dec 10, 2025
@ramnes ramnes force-pushed the ramnes/no-password branch 2 times, most recently from e6237fb to 6ed3594 Compare December 10, 2025 15:35
@ramnes ramnes force-pushed the ramnes/no-password branch from 9d40a13 to e0df29c Compare December 11, 2025 09:51
@ramnes ramnes force-pushed the ramnes/no-password branch from e0df29c to 4d0921f Compare December 11, 2025 09:52
Copy link
Collaborator

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

rest lgtm.

"github.com/stretchr/testify/require"
)

func TestCheckSha2CacheCredentials_EmptyPassword(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this test be put into auth_test.go, below TestCompareSha256PasswordAuthData_EmptyPassword?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you want to move checkSha2CacheCredentials in auth.go as well?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, your reason is to use auth_switch_response_test.go to check function in auth_switch_response.go. I think it's reasonable from this view.

@lance6716 lance6716 merged commit 6ec39f6 into go-mysql-org:master Dec 12, 2025
18 checks passed
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