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

Unified Diff: android_webview/browser/net/aw_network_delegate.cc

Issue 2752543006: Don't block blob URLs by webview URL filtering. (Closed)
Patch Set: without PlzNavigate Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/net/aw_network_delegate.cc
diff --git a/android_webview/browser/net/aw_network_delegate.cc b/android_webview/browser/net/aw_network_delegate.cc
index 012a5f83fdf16dd55bf22b44893b91f9a9baaae4..5aab4e90b503b454cd639daf778396dafafac1ea 100644
--- a/android_webview/browser/net/aw_network_delegate.cc
+++ b/android_webview/browser/net/aw_network_delegate.cc
@@ -56,8 +56,13 @@ int AwNetworkDelegate::OnBeforeURLRequest(
url_blacklist_manager_ =
AwBrowserContext::GetDefault()->GetURLBlacklistManager();
}
- if (url_blacklist_manager_->IsURLBlocked(request->url()))
+ // Ignore blob scheme for two reasons:
+ // 1) PlzNavigate uses it to deliver the response to the renderer.
+ // 2) A whitelisted page can use blob URLs internally.
+ if (!request->url().SchemeIs(url::kBlobScheme) &&
+ url_blacklist_manager_->IsURLBlocked(request->url())) {
return net::ERR_BLOCKED_BY_ADMINISTRATOR;
+ }
return net::OK;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698