New issue
Advanced search Search tips

Issue 799437 link

Starred by 1 user

Issue metadata

Status: Available
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

SigninManager::SignoutAndRemoveAllAccounts is misleading

Project Member Reported by droger@chromium.org, Jan 5 2018

Issue description

Under some conditions, the accounts are not removed.

There is an early return in the function if the user is not signed in, or if signin is in progress.

There is at least one case where this leads to wrong code:


void OneClickSigninSyncStarter::CancelSigninAndDelete() {
  if (signin::IsDicePrepareMigrationEnabled()) {
    SigninManagerFactory::GetForProfile(profile_)->SignOutAndKeepAllAccounts(
        signin_metrics::ABORT_SIGNIN,
        signin_metrics::SignoutDelete::IGNORE_METRIC);
  } else {
    SigninManagerFactory::GetForProfile(profile_)->SignOutAndRemoveAllAccounts(
        signin_metrics::ABORT_SIGNIN,
        signin_metrics::SignoutDelete::IGNORE_METRIC);
  }

In that example, the if is actually unnecessary, because accounts are not going to be removed in either case, which is clearly not what the developper intended. Luckily I think this has no actual consequence on the product, but this looks dangerous.

SigninManager::DoSignout also has this strange comment, in the case signout is called while the user is not signed in:

// Clean up our transient data and exit if we aren't signed in.
// This avoids a perf regression from clearing out the TokenDB if
// SignOut() is invoked on startup to clean up any incomplete previous
// signin attempts.

This comment implies that tokens are not deleted in this case, to improve performance (but at the cost of privacy/security). This case is probably rare enough (at least now, maybe it was different at the time this comment was written), that this tradeoff should be re-examined.
 
Status: Assigned (was: Available)
Project Member

Comment 2 by sheriffbot@chromium.org, Sep 3

Status: Available (was: Assigned)
--Chrome Identity automated triaging--

This bug is Assigned and has gone one month without any activity, so it is being moved to Available to indicate that it is not actively being worked on. If you are working on this bug, please mark yourself as the owner and move back to Assigned. Please see https://goo.gl/78kbny for more details. Please remove the Services>SignIn or UI>Browser>Profiles components if this bug isn't related to Chrome Identity.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment