Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Issue 2298733002: Filter out credentials with non-matching schemes (Closed)

Created:
4 years, 3 months ago by vabr (Chromium)
Modified:
4 years, 3 months ago
Reviewers:
dvadym, Mike West
CC:
chromium-reviews, gcasto+watchlist_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Filter out credentials with non-matching schemes PasswordFormManager::ProcessMatches currently happily accepts credentials from PasswordStore with a different PasswordForm::Scheme than the observed form has. However, it still has a DCHECK against it later (in the Autofill* methods), so it is clearly not expecting these, rather than mixing the schemes being by design. And it should not be by design. Especially, if the saved credential is a non-HTML one, and should be filled in a HTML form. Mixing them makes the non-HTML credential vulnerable against (injected attacker's) JavaScript accessing them. This CL filters out credentials with non-matching scheme from the batch coming from the PasswordStore. Given the absence of DCHECKs in release builds, this actually changes the behaviour for Chrome users, but the change is a desired one. BUG=640897 Committed: https://crrev.com/da597b2f777ea4ac768164bee01f39a90fba3c65 Cr-Commit-Position: refs/heads/master@{#415622}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -2 lines) Patch
M components/password_manager/core/browser/password_form_manager.cc View 1 chunk +11 lines, -2 lines 0 comments Download
M components/password_manager/core/browser/password_form_manager_unittest.cc View 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (8 generated)
vabr (Chromium)
Hi Mike, Does the security argument in the CL description about not mixing credential schemes ...
4 years, 3 months ago (2016-08-31 11:42:59 UTC) #4
Mike West
On 2016/08/31 at 11:42:59, vabr wrote: > Hi Mike, > > Does the security argument ...
4 years, 3 months ago (2016-08-31 12:15:31 UTC) #7
vabr (Chromium)
On 2016/08/31 12:15:31, Mike West (OOO until 29th) wrote: > On 2016/08/31 at 11:42:59, vabr ...
4 years, 3 months ago (2016-08-31 13:02:26 UTC) #8
vabr (Chromium)
Hi Vadym! I would appreciate your review of this CL. Thanks! Vaclav
4 years, 3 months ago (2016-08-31 13:03:05 UTC) #10
Mike West
On 2016/08/31 at 13:02:26, vabr wrote: > On 2016/08/31 12:15:31, Mike West (OOO until 29th) ...
4 years, 3 months ago (2016-08-31 13:07:08 UTC) #11
dvadym
This code is LGTM. Acctually this filtering is needed only when non-database store is used ...
4 years, 3 months ago (2016-08-31 13:27:30 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2298733002/1
4 years, 3 months ago (2016-08-31 13:44:50 UTC) #14
vabr (Chromium)
Thanks both of you for the review, and also thank for pointing our that the ...
4 years, 3 months ago (2016-08-31 13:45:18 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-08-31 13:49:19 UTC) #16
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/da597b2f777ea4ac768164bee01f39a90fba3c65 Cr-Commit-Position: refs/heads/master@{#415622}
4 years, 3 months ago (2016-08-31 13:52:55 UTC) #18
fgorski
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2298263002/ by fgorski@chromium.org. ...
4 years, 3 months ago (2016-08-31 16:17:05 UTC) #19
vabr (Chromium)
4 years, 3 months ago (2016-09-01 07:53:21 UTC) #20
Message was sent while issue was closed.
On 2016/08/31 13:27:30, dvadym wrote:
> This code is LGTM.
> Acctually this filtering is needed only when non-database store is used (i.e.
> for Linux backends). In Login database only credentials with the same scheme
are
> fetched, since a regular expression in SQL for fetching credentials contain a
> scheme of observed credentials.
>
https://cs.chromium.org/chromium/src/components/password_manager/core/browser...

BTW, this issue does affect Login Database. The scheme checked in the referenced
code is about the URL scheme (which is also checked in the backends), whereas
this issue is about the PasswordForm::Scheme. It led twice to confusion on this
CL, I start thinking we should rename PasswordForm::Scheme. It might be tricky,
though, because it might have entered some protobuf definitions used by sync.

Cheers,
Vaclav

Powered by Google App Engine
This is Rietveld 408576698