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

Issue 1403001: Modifying the "dangerous download" algorithm. (Closed)

Created:
10 years, 9 months ago by pierre.lafayette
Modified:
9 years, 7 months ago
CC:
chromium-reviews, brettw-cc_chromium.org, ben+cc_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

Modifying the "dangerous download" algorithm. Downloads are considered dangerous if: a) The file is dangerous just by sitting on the drive, without needing to be clicked on e.g. dll, xbap b) The file is executable and the download was not user initiated. c) They are an extension that is not from the gallery We have defined a user initiated download as 3 possible cases: a) A user enters a URL into the address bar that is a file b) A user left clicks on a URL that is a file c) A user right clicks and does "Save As" on a URL that is a file. BUG=9044 TEST=Open a page with a download link to a dangerous file that is not an extension, e.g. an .exe file, and left click on the link. The download should proceed without a prompt.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Adding the navigation type information to the DownloadCreateInfo. #

Patch Set 3 : Removing extra new line. #

Patch Set 4 : Removing files that are no longer part of this changelist. #

Patch Set 5 : Store state in RenderViewHostDelegate. Resource requests should not care about navigation state. #

Total comments: 2

Patch Set 6 : Fixing nits and bug. #

Total comments: 1

Patch Set 7 : Removing unnecessary code. Fixing nit. #

Total comments: 2

Patch Set 8 : Clear provisional load state after download. #

Total comments: 1

Patch Set 9 : User gesture state will now come from ResourceRequest #

Patch Set 10 : Fixing comment #

Total comments: 1

Patch Set 11 : Adding danger levels for files #

Patch Set 12 : Fixing incorrect logic #

Patch Set 13 : Removing unnecessary namespace qualifier #

Total comments: 15

Patch Set 14 : Adding new extensions and setting xbap to be Dangerous #

Patch Set 15 : Moving extension methods out of download_util.h #

Total comments: 1

Patch Set 16 : Adding missing gyp change #

Patch Set 17 : Adding .sys and .drv as Dangerous extensions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+359 lines, -275 lines) Patch
M chrome/browser/download/download_exe.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -241 lines 0 comments Download
A chrome/browser/download/download_extensions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/download/download_extensions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +258 lines, -0 lines 0 comments Download
M chrome/browser/download/download_item.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/download/download_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +0 lines, -11 lines 0 comments Download
M chrome/browser/download/download_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/extensions/user_script_listener_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/download_create_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/history/download_create_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/download_resource_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host_request_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host_request_info.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_queue_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -1 line 0 comments Download
M chrome/common/navigation_gesture.h View 1 2 3 4 1 chunk +2 lines, -6 lines 0 comments Download
M chrome/common/render_messages_params.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/render_messages_params.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -1 line 0 comments Download
M webkit/glue/resource_loader_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/glue/resource_loader_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/weburlloader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 54 (0 generated)
pierre.lafayette
10 years, 9 months ago (2010-03-26 07:54:13 UTC) #1
Jay Civelli
http://codereview.chromium.org/1403001/diff/1/2 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/1403001/diff/1/2#newcode669 chrome/browser/download/download_manager.cc:669: // b) Unprompted downloads are saved without a prompt ...
10 years, 9 months ago (2010-03-26 17:31:26 UTC) #2
Avi (use Gerrit)
http://codereview.chromium.org/1403001/diff/1/2 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/1403001/diff/1/2#newcode669 chrome/browser/download/download_manager.cc:669: // b) Unprompted downloads are saved without a prompt ...
10 years, 9 months ago (2010-03-26 17:34:45 UTC) #3
jcampan
>> Nit: iff -> if > > iff = if and only if. Valid. Ah! ...
10 years, 9 months ago (2010-03-26 17:36:37 UTC) #4
pierre.lafayette
+pkasting Peter can you offer some insight here? Thanks.
10 years, 9 months ago (2010-03-26 19:29:01 UTC) #5
Peter Kasting
On 2010/03/26 19:29:01, pierre.lafayette wrote: > +pkasting > > Peter can you offer some insight ...
10 years, 9 months ago (2010-03-26 20:03:40 UTC) #6
pierre.lafayette
On 2010/03/26 20:03:40, Peter Kasting wrote: > On 2010/03/26 19:29:01, pierre.lafayette wrote: > > +pkasting ...
10 years, 9 months ago (2010-03-26 20:47:21 UTC) #7
Peter Kasting
On 2010/03/26 20:47:21, pierre.lafayette wrote: > On 2010/03/26 20:03:40, Peter Kasting wrote: > > On ...
10 years, 9 months ago (2010-03-26 20:56:56 UTC) #8
pierre.lafayette
Hi Brett, can you comment on the following? Referencing Jay's comment: > Also, since this ...
10 years, 9 months ago (2010-03-26 21:22:45 UTC) #9
pierre.lafayette
Hi Jay, see my comments below. Thanks! http://codereview.chromium.org/1403001/diff/1/2 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/1403001/diff/1/2#newcode1139 chrome/browser/download/download_manager.cc:1139: is_user_triggered_download = ...
10 years, 9 months ago (2010-03-27 21:37:16 UTC) #10
pierre.lafayette
On 2010/03/27 21:37:16, pierre.lafayette wrote: > Add that with the low probability that a user ...
10 years, 9 months ago (2010-03-27 21:43:01 UTC) #11
Peter Kasting
On 2010/03/27 21:37:16, pierre.lafayette wrote: > I've tried hard to make this case happen on ...
10 years, 9 months ago (2010-03-27 22:00:26 UTC) #12
Aaron Boodman
Sorry to butt in, but we thought really hard about this case for extensions. http://codereview.chromium.org/1403001/diff/1/2 ...
10 years, 9 months ago (2010-03-28 00:39:08 UTC) #13
pierre.lafayette
http://codereview.chromium.org/1403001/diff/1/2 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/1403001/diff/1/2#newcode669 chrome/browser/download/download_manager.cc:669: // b) Unprompted downloads are saved without a prompt ...
10 years, 9 months ago (2010-03-28 06:13:56 UTC) #14
Aaron Boodman
On 2010/03/28 06:13:56, pierre.lafayette wrote: > Now that I think of it, perhaps you are ...
10 years, 9 months ago (2010-03-28 06:25:39 UTC) #15
pierre.lafayette
Adding the navigation type information to the DownloadCreateInfo. This version of the patch requires a ...
10 years, 8 months ago (2010-04-03 06:10:43 UTC) #16
Aaron Boodman
lgtm wrt extensions
10 years, 8 months ago (2010-04-03 06:29:46 UTC) #17
Peter Kasting
Going through my old reviews, this issue died. It seems like the next step was ...
10 years, 4 months ago (2010-07-27 19:27:33 UTC) #18
pierre.lafayette
On 2010/07/27 19:27:33, Peter Kasting wrote: > Going through my old reviews, this issue died. ...
10 years, 3 months ago (2010-09-07 18:16:25 UTC) #19
Peter Kasting
I suggest contacting someone like darin, abarth, or dglazkov to help you figure out a ...
10 years, 3 months ago (2010-09-07 18:22:53 UTC) #20
pierre.lafayette
New patch. The issue with the previous patch was that resource requests and navigations are ...
10 years, 2 months ago (2010-10-21 05:17:02 UTC) #21
Paweł Hajdan Jr.
Drive-by with download comments. Please let me take another look before committing. http://codereview.chromium.org/1403001/diff/49001/50001 File chrome/browser/download/download_util.cc ...
10 years, 2 months ago (2010-10-21 06:56:07 UTC) #22
pierre.lafayette
On 2010/10/21 06:56:07, Paweł Hajdan Jr. wrote: > Drive-by with download comments. Please let me ...
10 years, 2 months ago (2010-10-21 13:52:11 UTC) #23
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM with a comment. Thanks! http://codereview.chromium.org/1403001/diff/55001/56001 File chrome/browser/download/download_util.cc (right): ...
10 years, 2 months ago (2010-10-21 13:58:02 UTC) #24
brettw
http://codereview.chromium.org/1403001/diff/62001/63006 File chrome/browser/tab_contents/tab_contents.h (right): http://codereview.chromium.org/1403001/diff/62001/63006#newcode276 chrome/browser/tab_contents/tab_contents.h:276: const GURL& provisional_load_url() const { return provisional_load_url_; } The ...
10 years, 2 months ago (2010-10-22 20:04:50 UTC) #25
pierre.lafayette
http://codereview.chromium.org/1403001/diff/62001/63006 File chrome/browser/tab_contents/tab_contents.h (right): http://codereview.chromium.org/1403001/diff/62001/63006#newcode276 chrome/browser/tab_contents/tab_contents.h:276: const GURL& provisional_load_url() const { return provisional_load_url_; } On ...
10 years, 2 months ago (2010-10-23 07:53:22 UTC) #26
brettw
On 2010/10/23 07:53:22, pierre.lafayette wrote: > RenderView::OnNavigate, which gets called for address bar navigations, will ...
10 years, 2 months ago (2010-10-23 22:25:07 UTC) #27
pierre.lafayette
On 2010/10/23 22:25:07, brettw wrote: > On 2010/10/23 07:53:22, pierre.lafayette wrote: > > RenderView::OnNavigate, which ...
10 years, 1 month ago (2010-10-25 14:34:56 UTC) #28
brettw
I talked to Peter for a while about this. He thought there was a WebKit ...
10 years, 1 month ago (2010-11-01 23:01:18 UTC) #29
pierre.lafayette
On 2010/11/01 23:01:18, brettw wrote: > I talked to Peter for a while about this. ...
10 years, 1 month ago (2010-11-02 17:43:08 UTC) #30
pierre.lafayette
This new patch puts the user gesture flag in the DownloadCreateInfo now that the ResourceRequest ...
10 years, 1 month ago (2010-11-07 11:15:32 UTC) #31
brettw
Thanks a lot for spending the time to clean this up from the WebKit side. ...
10 years, 1 month ago (2010-11-09 20:51:48 UTC) #32
pierre.lafayette
Made requested changes to add danger level enum for checking downloaded files.
10 years, 1 month ago (2010-11-11 14:40:15 UTC) #33
bkr
Some comments about extensions http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc File chrome/browser/download/download_exe.cc (right): http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc#newcode59 chrome/browser/download/download_exe.cc:59: static const struct Executables { ...
10 years, 1 month ago (2010-11-17 02:30:04 UTC) #34
Peter Kasting
http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc File chrome/browser/download/download_exe.cc (right): http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc#newcode65 chrome/browser/download/download_exe.cc:65: { "html", AllowOnUserGesture }, On 2010/11/17 02:30:04, bkr wrote: ...
10 years, 1 month ago (2010-11-17 02:36:07 UTC) #35
brettw
I'm currently on vacation, will look at this next week. Sorry for the delay, please ...
10 years, 1 month ago (2010-11-18 02:13:29 UTC) #36
Chris Evans
Some initial comments on which file types are really dangerous. http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc File chrome/browser/download/download_exe.cc (right): http://codereview.chromium.org/1403001/diff/132001/chrome/browser/download/download_exe.cc#newcode66 ...
10 years, 1 month ago (2010-11-19 02:55:53 UTC) #37
Peter Kasting
On 2010/11/19 02:55:53, Chris Evans wrote: > Some initial comments on which file types are ...
10 years, 1 month ago (2010-11-19 02:58:11 UTC) #38
brettw
LGTM. Peter, do you have any more comments or is this good to go? Pierre: ...
10 years, 1 month ago (2010-11-22 22:43:02 UTC) #39
Peter Kasting
If you're OK, I'm OK. I likely don't understand the plumbing anyway.
10 years, 1 month ago (2010-11-22 23:07:01 UTC) #40
pierre.lafayette
On 2010/11/22 22:43:02, brettw wrote: > LGTM. Peter, do you have any more comments or ...
10 years ago (2010-11-23 14:06:09 UTC) #41
pierre.lafayette
On 2010/11/22 22:43:02, brettw wrote: > LGTM. Peter, do you have any more comments or ...
10 years ago (2010-11-24 18:57:16 UTC) #42
brettw
I don't see the gyp changes for the new file add/removes. Did you forget to ...
10 years ago (2010-11-24 21:57:29 UTC) #43
pierre.lafayette
On 2010/11/24 21:57:29, brettw wrote: > I don't see the gyp changes for the new ...
10 years ago (2010-11-25 03:56:06 UTC) #44
brettw
LGTM
10 years ago (2010-11-25 17:04:50 UTC) #45
pierre.lafayette
On 2010/11/25 17:04:50, brettw wrote: > LGTM Thanks for the reviews! Needs a land :)
10 years ago (2010-11-25 18:47:15 UTC) #46
cevans
On Thu, Nov 25, 2010 at 10:47 AM, <pierre.lafayette@gmail.com> wrote: > On 2010/11/25 17:04:50, brettw ...
10 years ago (2010-11-28 21:29:19 UTC) #47
pierre.lafayette
On 2010/11/28 21:29:19, cevans_google.com wrote: > On Thu, Nov 25, 2010 at 10:47 AM, <mailto:pierre.lafayette@gmail.com> ...
10 years ago (2010-12-02 17:05:51 UTC) #48
bkr
.sys should also be added to the dangerous list. It is has DLL like behaviors ...
10 years ago (2010-12-02 17:42:24 UTC) #49
Peter Kasting
On 2010/12/02 17:42:24, bkr wrote: > .sys should also be added to the dangerous list. ...
10 years ago (2010-12-02 19:06:02 UTC) #50
pierre.lafayette
On 2010/12/02 19:06:02, Peter Kasting wrote: > On 2010/12/02 17:42:24, bkr wrote: > > .sys ...
10 years ago (2010-12-03 14:56:42 UTC) #51
Peter Kasting
bkr: Is landing this kosher?
10 years ago (2010-12-03 17:19:45 UTC) #52
bkr
So, if we're treating files that are dangerous merely by the fact that they are ...
10 years ago (2010-12-03 23:11:29 UTC) #53
Peter Kasting
10 years ago (2010-12-06 22:22:27 UTC) #54
I'm closing this in favor of http://codereview.chromium.org/5603008/ , where I'm
running this through the trybots in preparation for landing.

Powered by Google App Engine
This is Rietveld 408576698