Skip to content

Conversation

@qibinhang
Copy link

I noticed that the checkpw method in com.hellokaton.blade.kit.BCrypt is not fully tested. Specifically, the current test suite does not cover the branch if (hashed_bytes.length != try_bytes.length), which handles scenarios where the stored password hashes may be corrupted. These scenarios are important to consider, as real-world issues—often introduced during database migrations or system updates—can lead to such inconsistencies.

To address this gap, I’ve added a test that explicitly validates this scenario. I hope it proves helpful in detecting potential regressions.

If additional test coverage would be valuable, I’d be happy to contribute further by looking into other classes you consider important for a follow-up PR.

@Shensijia
Copy link

Shensijia commented Jul 28, 2025 via email

@qibinhang
Copy link
Author

您好,请问这个测试用例是否有用,特别是检测潜在的回归问题?

@Shensijia
Copy link

Shensijia commented Sep 1, 2025 via email

@weeklynote
Copy link

weeklynote commented Sep 1, 2025 via email

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.

3 participants