commit | dc5ed1036ef464b0bbc6575c9ac518e3997808ea | [log] [tgz] |
---|---|---|
author | Yao Xiao <[email protected]> | Tue Jun 04 19:19:09 2019 |
committer | Commit Bot <[email protected]> | Tue Jun 04 19:19:09 2019 |
tree | 319e69ed7ea28715ea4ad75277b21887f866d7a9 | |
parent | 3bce5306af4d3b41290f218e9b706c9bb199f8e4 [diff] |
Fix multiple download protection for <a download> x-origin redirect The bug: multiple downloads protection is bypassed when there are multiple <a download> download attempts and they end up triggering a x-origin redirect to another download. The cause: Each x-origin redirect following the <a download> is being treated as a navigation. (See DownloadManagerImpl::InterceptDownload() (NetworkService enabled), DownloadResourceHandler::OnRequestRedirected() (NetworkService disabled)). The navigation will hit DownloadRequestLimiter::TabDownloadState::DidStartNavigation that resets some state of the limiter, and future downloads won't be prevented. The solution: plumb |from_download_cross_origin_redirect| to NavigationRequest, and skip resetting the limiter state when the flag is true. Bug: 959640 Change-Id: I7d8aca09670be5258e149e34e3e6f2f3107442ff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627209 Reviewed-by: Jochen Eisinger <[email protected]> Reviewed-by: Min Qin <[email protected]> Commit-Queue: Yao Xiao <[email protected]> Cr-Commit-Position: refs/heads/master@{#665973}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .