commit | 59c00e044462cbeb4f9ce87347219896523935a0 | [log] [tgz] |
---|---|---|
author | Kush Sinha <sinhak@chromium.org> | Thu Jun 20 14:41:13 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jun 20 14:41:13 2019 |
tree | c9bb8fa1398c440a9bfe080092b154f2793d27b4 | |
parent | 5c404f4272d722c4b748093031593f3c04664ec6 [diff] |
Fix race condition in OAuth token status save On Chrome OS, during a session restore, |OAuth2LoginManager::OnSessionMergeSuccess| transitively sets the token status as valid. |AuthSyncObserver::HandleAuthError| sets the token status as invalid if the token was in a persistent error state, but does not correct it if the token status changes later. There is no connection (from a flow of control perspective) between these two entities and they are free to race. In certain cases, it *can* happen that |AuthSyncObserver| gets the status of an old invalidated token and marks it as invalid *after* |OAuth2LoginManager| has marked the new token as valid. |AuthSyncObserver| corrects for this behaviour for supervised accounts. Make it work for all account types. This is a speculative fix for the attached bug. Bug: 952570 Change-Id: Ic1b3b0fe44bfec57495fcc8ecf5617c7b8fd7dd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1665940 Reviewed-by: Xiyuan Xia <xiyuan@chromium.org> Commit-Queue: Kush Sinha <sinhak@chromium.org> Cr-Commit-Position: refs/heads/master@{#670890}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .