Declarative Net Request: An extension can block its own background page. |
|||
Issue descriptionA chrome extension has implicit host permissions to its own origin (chrome-extension://extension_id/). This allows the extension to monitor and modify any of its own requested resources using the WebRequest API. See crbug.com/92395 which enabled this for the WebRequest API. However this is not ideal for DNR since, for example, writing a simple extension to block all html pages would also end up blocking the generated background page of the extension itself. This is not a problem for the WebRequest API since it is the background page which does the blocking in case of WebRequest API.
,
Apr 5 2018
,
Apr 10 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a22fd79d470336e8d3012e09647d28a08426c2c9 commit a22fd79d470336e8d3012e09647d28a08426c2c9 Author: Karan Bhatia <karandeepb@chromium.org> Date: Tue Apr 10 05:55:43 2018 DNR: Prevent extensions from intercepting requests on chrome-extension scheme. A chrome extension has implicit host permissions to its own origin (chrome- extension://extension_id/). This allows the extension to monitor and modify requests to any of its own resources using the WebRequest API. However, this allows an extension with DNR to also possibly/mistakenly block or redirect its own background page. This is not a problem for the WebRequest API since it is (generally) the background page which does the blocking in case of the WebRequest API. To fix, simply whitelist all resources on the chrome-extension scheme as far as DNR is concerned. BUG= 829225 Change-Id: I022f137f1fde20276de22f0f8529aa4f1c9a53db Reviewed-on: https://chromium-review.googlesource.com/1000770 Reviewed-by: Devlin <rdevlin.cronin@chromium.org> Commit-Queue: Karan Bhatia <karandeepb@chromium.org> Cr-Commit-Position: refs/heads/master@{#549432} [modify] https://crrev.com/a22fd79d470336e8d3012e09647d28a08426c2c9/chrome/browser/extensions/api/declarative_net_request/declarative_net_request_browsertest.cc [modify] https://crrev.com/a22fd79d470336e8d3012e09647d28a08426c2c9/chrome/browser/extensions/api/declarative_net_request/ruleset_manager_unittest.cc [modify] https://crrev.com/a22fd79d470336e8d3012e09647d28a08426c2c9/extensions/browser/api/declarative_net_request/ruleset_manager.cc [modify] https://crrev.com/a22fd79d470336e8d3012e09647d28a08426c2c9/extensions/browser/api/declarative_net_request/ruleset_manager.h
,
Apr 18 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by karandeepb@chromium.org
, Apr 5 2018