-
Notifications
You must be signed in to change notification settings - Fork 2.4k
fix(generic): save new refresh_token value #1838
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
base: main
Are you sure you want to change the base?
Conversation
actually replace the deprecated token with the new and checked value
Thank you for bearing with us for such a long time in limbo. It's not quite over yet; @mjcheetham is busy right now with the huge task to re-establish a working release process (currently all signing/notarizing is missing all prerequisite secrets, and as a consequence no binaries would be signed, which would break Git Credential Manager on macOS). So please bear with us a bit longer. Just a quick note why this has not yet been merged: While on the face of it, it should be a no-brainer to store any new refresh token (at least it was me, until I asked Matthew about it and he patiently explained to me that I need to consider more scenarios than the obvious one), a new refresh token can be provided in circumstances where we would need to ask the user for confirmation (for example if the account name was changed, in which case the account name also would have to be updated). Another plausible situation where this would happen is when there is a malicious actor who uses the same account elsewhere, in which case Git Credential Manager should probably ring the alarm bells. Also, there are now finally credential protocol enhancements in Git itself that would allow refresh tokens to be processed in a stateful manner, with enough context to avoid, say, storing them for the wrong account. For more details see #2059. In short: More things need to be considered before this Pull Request can go forward. And the release process needs to be fixed before it would be well-spent time to enhance GCM... I therefore have to ask for even more patience... |
This update happens only in the context of an already completely resolved account. At this point we:
Assuming we are dealing with a server that is already set up according to current recommendations
The current behavior is unlikely to have an effect on most aspects of MITM attacks. This update is actually the only operation that MUST be performed (immediately) at this point. If the superseded
Also; the comment above it says the code should be this way! ☺ |
I have to admit that I lack understanding about the logic. For one, I do not even understand how the current code works, and when I look at the |
Only the This PR is to address a bug in processing the Even a later The members Use and persistent storage of The
|
Missing the update of single-use-tokens will lead to continuous re-registration requirement for GCM.
Check is done correctly for new value.
Just the storage step used the old value instead of the new one.