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

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 1016373002: Perform CORS access checks on Beacon redirects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased + add mixed content test Created 5 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 | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/loader/BeaconLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 26f51c5a6d6e55514c018a2be9e9c7a2f99cbbfa..c8b44faf69bcfad2d0cf0fea204c3d633837c59a 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -1159,7 +1159,8 @@ bool ResourceFetcher::canAccessRedirect(Resource* resource, ResourceRequest& req
sourceOrigin = context().securityOrigin();
String errorMessage;
- if (!CrossOriginAccessControl::handleRedirect(resource, sourceOrigin, request, redirectResponse, options, errorMessage)) {
+ StoredCredentials withCredentials = resource->lastResourceRequest().allowStoredCredentials() ? AllowStoredCredentials : DoNotAllowStoredCredentials;
+ if (!CrossOriginAccessControl::handleRedirect(sourceOrigin, request, redirectResponse, withCredentials, options, errorMessage)) {
if (resource->type() == Resource::Font)
toFontResource(resource)->setCORSFailed();
context().addConsoleMessage(errorMessage);
« no previous file with comments | « Source/core/fetch/CrossOriginAccessControl.cpp ('k') | Source/core/loader/BeaconLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698