Index: net/url_request/url_request_http_job.cc |
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc |
index 89a0ef9a6be470fcab0fa81314e4dde0f8aca376..0d7d125d3b99101d20b40448308dc1e142a23d1d 100644 |
--- a/net/url_request/url_request_http_job.cc |
+++ b/net/url_request/url_request_http_job.cc |
@@ -1006,6 +1006,11 @@ bool URLRequestHttpJob::IsSafeRedirect(const GURL& location) { |
// restrict redirects to externally handled protocols. Our consumer would |
// need to take care of those. |
+ // This is a special case: we need to disallow redirects to chrome:// |
+ // URIs by network resources for security reasons |
+ if (location.SchemeIs("chrome")) |
abarth-chromium
2011/09/12 19:51:21
The net module shouldn't really know anything abou
kenrb
2011/09/12 20:05:05
I know. This is a hack at this point, but the alte
|
+ return false; |
+ |
if (!URLRequest::IsHandledURL(location)) |
abarth-chromium
2011/09/12 19:51:21
Do we think that "chrome" is a handled URL?
kenrb
2011/09/12 20:05:05
Note the ! in the condition. It is not a handled U
rvargas (doing something else)
2011/09/12 21:07:14
I don't think hard coding "chrome:" is a good idea
kenrb
2011/09/13 00:27:53
Sorry, my mistake. I was confusing this with a lis
|
return true; |