-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix a panic in the credential code #5490
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
Conversation
We'd like to use this function in a different package, so let's rename it to be public.
Now that this function is public, let's add a documentation comment for it to help inform users.
In some cases, we might end up with an entry that's missing either a username or password, and in such a case, we wouldn't want to panic, like we do now. Solve this by using the function `FirstEntryForKey` to look up the value and return an empty string if none is present.
chrisd8088
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
|
@bk2204 - what is the plan about releasing it with a formal release? |
|
This will be in v3.5.0. If people would like us to do a v3.4.1 for this, we can, but we need someone who's affected to report back to us that it's fixed, either here or in #5464. Users can build from the main branch or use the CI artifacts (which are unsigned) in the mean time or to test. |
|
Is there any workaround? or either what are the cases that it happens? because i see that sometimes it haapens and sometime no. i will test it soon and will udpate |
|
I can't reproduce the problem, so I don't know when it happens and when it doesn't. It doesn't trigger for me, for example. That's why we need somebody who is seeing it to verify that the problem is fixed. |
|
I was able to reproduce the crash, as described in #5464 (comment), and demonstrate that this PR does resolve the problem, as noted in #5464 (comment). |
Fix a panic in the credential code
In some cases, we might end up with an entry that's missing either a username or password, and in such a case, we wouldn't want to panic, like we do now. Solve this by using the function
FirstEntryForKeyto look up the value and return an empty string if none is present.Do some refactoring in preparatory commits to make this possible.