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

Issue 410373003: Fix cross origin check when deciding to show the HTTP auth interstitial. (Closed)

Created:
6 years, 5 months ago by meacer
Modified:
6 years, 4 months ago
CC:
chromium-reviews
Project:
chromium
Visibility:
Public.

Description

Fix cross origin check when deciding to show the HTTP auth interstitial. HTTP auth prompts show a blank interstitial which causes the omnibox to show the correct URL and page contents to clear in order to prevent phishing. The logic for this interstitial currently checks only for the visible URL. This misses the case where the user navigates directly the URL: The URL of the resource with HTTP Auth will be the same as the visible entry so no interstitial will be shown. This patch adds a check to see if the last committed entry is also different then the URL of the resource with HTTP Auth. BUG=396961 TEST=LoginPromptBrowserTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290090

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Fix test #

Total comments: 4

Patch Set 4 : Check only LastCommittedURL #

Total comments: 13

Patch Set 5 : pkasting and nasko comments #

Patch Set 6 : Fix WebSocket test #

Patch Set 7 : Fix mac test #

Patch Set 8 : Change test name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -18 lines) Patch
M chrome/browser/net/websocket_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/login/login_prompt.cc View 1 2 3 4 1 chunk +10 lines, -1 line 0 comments Download
M chrome/browser/ui/login/login_prompt_browsertest.cc View 1 2 3 4 6 chunks +39 lines, -16 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
meacer
Nasko, here is another http auth bug. Can you please see if the cross origin ...
6 years, 5 months ago (2014-07-24 01:57:14 UTC) #1
nasko
LGTM
6 years, 5 months ago (2014-07-24 07:01:48 UTC) #2
meacer
Nasko: I added a test case. Peter: Can you please take a look as an ...
6 years, 4 months ago (2014-08-05 19:42:10 UTC) #3
Peter Kasting
https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc#newcode516 chrome/browser/ui/login/login_prompt.cc:516: request_url.GetOrigin())) { It seems a bit weird that we ...
6 years, 4 months ago (2014-08-05 20:18:10 UTC) #4
meacer
https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc#newcode516 chrome/browser/ui/login/login_prompt.cc:516: request_url.GetOrigin())) { On 2014/08/05 20:18:10, Peter Kasting wrote: > ...
6 years, 4 months ago (2014-08-05 22:29:20 UTC) #5
Peter Kasting
https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc#newcode516 chrome/browser/ui/login/login_prompt.cc:516: request_url.GetOrigin())) { On 2014/08/05 22:29:19, Mustafa Emre Acer wrote: ...
6 years, 4 months ago (2014-08-05 23:15:34 UTC) #6
meacer
https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/40001/chrome/browser/ui/login/login_prompt.cc#newcode516 chrome/browser/ui/login/login_prompt.cc:516: request_url.GetOrigin())) { On 2014/08/05 23:15:34, Peter Kasting wrote: > ...
6 years, 4 months ago (2014-08-05 23:32:23 UTC) #7
Peter Kasting
LGTM https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc#newcode512 chrome/browser/ui/login/login_prompt.cc:512: // Check if the request is cross origin. ...
6 years, 4 months ago (2014-08-06 01:07:54 UTC) #8
nasko
Still LGTM with a few nits. https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc#newcode514 chrome/browser/ui/login/login_prompt.cc:514: // 1- The ...
6 years, 4 months ago (2014-08-06 10:17:37 UTC) #9
meacer
Thanks! https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc File chrome/browser/ui/login/login_prompt.cc (right): https://codereview.chromium.org/410373003/diff/60001/chrome/browser/ui/login/login_prompt.cc#newcode512 chrome/browser/ui/login/login_prompt.cc:512: // Check if the request is cross origin. ...
6 years, 4 months ago (2014-08-06 17:36:50 UTC) #10
meacer
The CQ bit was checked by meacer@chromium.org
6 years, 4 months ago (2014-08-06 18:58:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/410373003/80001
6 years, 4 months ago (2014-08-06 18:59:56 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-06 22:37:16 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-06 23:14:11 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/1717) linux_chromium_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_swarming/builds/3642)
6 years, 4 months ago (2014-08-06 23:14:12 UTC) #15
meacer
rsleevi: Can you please take a look at chrome/browser/net/websocket_browsertest.cc? Thanks.
6 years, 4 months ago (2014-08-15 23:10:57 UTC) #16
Ryan Sleevi
Nice catch. LGTM
6 years, 4 months ago (2014-08-15 23:14:27 UTC) #17
meacer
The CQ bit was checked by meacer@chromium.org
6 years, 4 months ago (2014-08-15 23:16:11 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/meacer@chromium.org/410373003/140001
6 years, 4 months ago (2014-08-15 23:18:24 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-08-16 05:39:41 UTC) #20
Message was sent while issue was closed.
Committed patchset #8 (140001) as 290090

Powered by Google App Engine
This is Rietveld 408576698