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

Unified Diff: content/browser/blob_storage/blob_dispatcher_host.cc

Issue 2385553002: Revert of Lock down the registration of blob:chrome-extension:// URLs (Closed)
Patch Set: Created 4 years, 3 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 | « content/browser/bad_message.h ('k') | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/blob_storage/blob_dispatcher_host.cc
diff --git a/content/browser/blob_storage/blob_dispatcher_host.cc b/content/browser/blob_storage/blob_dispatcher_host.cc
index 3c326a39f8dcf4097b80aa7d7c5946fa45110a66..4f2ed8439f15ee20201f45bef45f5b836ccfb62f 100644
--- a/content/browser/blob_storage/blob_dispatcher_host.cc
+++ b/content/browser/blob_storage/blob_dispatcher_host.cc
@@ -304,23 +304,12 @@
void BlobDispatcherHost::OnRegisterPublicBlobURL(const GURL& public_url,
const std::string& uuid) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- ChildProcessSecurityPolicyImpl* security_policy =
- ChildProcessSecurityPolicyImpl::GetInstance();
-
- // Blob urls have embedded origins. A frame should only be creating blob URLs
- // in the origin of its current document. Make sure that the origin advertised
- // on the URL is allowed to be rendered in this process.
- if (!public_url.SchemeIsBlob() ||
- !security_policy->CanCommitURL(process_id_, public_url)) {
- bad_message::ReceivedBadMessage(this, bad_message::BDH_DISALLOWED_ORIGIN);
- return;
- }
+ BlobStorageContext* context = this->context();
if (uuid.empty()) {
bad_message::ReceivedBadMessage(this,
bad_message::BDH_INVALID_URL_OPERATION);
return;
}
- BlobStorageContext* context = this->context();
if (!IsInUseInHost(uuid) || context->registry().IsURLMapped(public_url)) {
UMA_HISTOGRAM_ENUMERATION("Storage.Blob.InvalidURLRegister", BDH_INCREMENT,
BDH_TRACING_ENUM_LAST);
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698