fix: add nil check for Password in ToDockerV2AuthString#98
fix: add nil check for Password in ToDockerV2AuthString#98AR21SM wants to merge 1 commit intokrkn-chaos:mainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
please update the fork and rebase on main |
Signed-off-by: AR21SM <mahajanashishar21sm@gmail.com>
88d412d to
719daa6
Compare
done |
User description
Description
Fixes #97
In
ToDockerV2AuthString(), the code checks ifUsernameis not nil before dereferencing it, but doesn't checkPassword. This causes a nil pointer panic if username is provided without a password.Before:
After:
Documentation
No - this is a bug fix with no user-facing changes.
Related Documentation PR (if applicable)
N/A
PR Type
Bug fix
Description
Add nil check for
Passwordbefore dereferencing inToDockerV2AuthString()Prevents nil pointer panic when username provided without password
Diagram Walkthrough
File Walkthrough
models.go
Add Password nil check in auth string conversionpkg/provider/models/models.go
r.Passwordalongside existingr.Usernamecheck