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

Issue 2505203002: [net/auth] Reset AuthChallengeInfo before picking a new HttpAuthHandler. (Closed)

Created:
4 years, 1 month ago by asanka
Modified:
4 years, 1 month ago
Reviewers:
mmenke
CC:
cbentzel+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[net/auth] Reset AuthChallengeInfo when credentials are provided. HttpAuthController should be invoked in the following manner: : : +---------------------+ | HandleAuthChallenge +----+ +----------+----------+ | Credentials needed | | auth_info_ is valid | | No credentials v | needed +----------+----------+ | | ResetAuth | | +----------+----------+ | | | | | v | +-----------+------------+ | | MaybeGenerateAuthToken +<-+ +------------------------+ : Once HandleAuthChallenge is called, HttpAuthController indicates whether it needs credentials by setting |auth_info_| to a valid AuthChallengeInfo object. Code paths existed where the AuthChallengeInfo used with the prior handler may survive all the way through a ResetAuth / MaybeGenerateAuthToken / HandleAuthChallenge cycle. This of course left the HttpAuthController in an inconsistent state. This change ensures that |auth_info_| is only valid between a HandleAuthChallenge call that determines the need for external credentials and the corresponding ResetAuth call. It asserts that credentials have been provided if necessary prior to calling MaybeGenerateAuthToken or a followup HandleAuthChallenge via DCHECKs. BUG=none Committed: https://crrev.com/be76fc926553fe0e270f0ee8e3baf7b00dd41619 Cr-Commit-Position: refs/heads/master@{#432981}

Patch Set 1 #

Total comments: 3

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M net/http/http_auth_controller.cc View 1 5 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (8 generated)
asanka
This is tested in the big test refactor. It doesn't affect functionality other than the ...
4 years, 1 month ago (2016-11-16 22:21:18 UTC) #2
mmenke
https://codereview.chromium.org/2505203002/diff/1/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2505203002/diff/1/net/http/http_auth_controller.cc#newcode280 net/http/http_auth_controller.cc:280: auth_info_ = nullptr; Can this be put at the ...
4 years, 1 month ago (2016-11-17 16:07:20 UTC) #7
asanka
https://codereview.chromium.org/2505203002/diff/1/net/http/http_auth_controller.cc File net/http/http_auth_controller.cc (right): https://codereview.chromium.org/2505203002/diff/1/net/http/http_auth_controller.cc#newcode280 net/http/http_auth_controller.cc:280: auth_info_ = nullptr; On 2016/11/17 at 16:07:19, mmenke wrote: ...
4 years, 1 month ago (2016-11-17 18:01:25 UTC) #9
mmenke
LGTM, though come to think of it...do we even need auth_info_? Seems like we could ...
4 years, 1 month ago (2016-11-17 18:06:56 UTC) #10
asanka
On 2016/11/17 at 18:06:56, mmenke wrote: > LGTM, though come to think of it...do we ...
4 years, 1 month ago (2016-11-17 18:16:40 UTC) #11
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/2505203002/20001
4 years, 1 month ago (2016-11-17 18:21:31 UTC) #13
mmenke
On 2016/11/17 18:16:40, asanka wrote: > On 2016/11/17 at 18:06:56, mmenke wrote: > > LGTM, ...
4 years, 1 month ago (2016-11-17 18:28:28 UTC) #14
asanka
On 2016/11/17 at 18:28:28, mmenke wrote: > On 2016/11/17 18:16:40, asanka wrote: > > On ...
4 years, 1 month ago (2016-11-17 18:35:42 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-17 21:51:59 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 21:54:51 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/be76fc926553fe0e270f0ee8e3baf7b00dd41619
Cr-Commit-Position: refs/heads/master@{#432981}

Powered by Google App Engine
This is Rietveld 408576698