-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 2160: Proxy requests for CRLSets through crlsets[n].brave.com #920
Conversation
52efedb
to
808d1b5
Compare
common/network_constants.cc
Outdated
@@ -14,6 +14,8 @@ const char kEmptyImageDataURI[] = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP/ | |||
const char kJSDataURLPrefix[] = "data:application/javascript;base64,"; | |||
const char kGeoLocationsPattern[] = "https://www.googleapis.com/geolocation/v1/geolocate?key=*"; | |||
const char kSafeBrowsingPrefix[] = "https://safebrowsing.googleapis.com/"; | |||
const char kCRLSetPrefix1[] = "http://dl.google.com/release2/chrome_component/*crl-set*"; | |||
const char kCRLSetPrefix2[] = "http://*.gvt1.com/edgedl/release2/chrome_component/*crl-set*"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure these are never sent over HTTPS instead of HTTP?
|
||
if (crlSet_pattern2.MatchesHost(ctx->request_url)) { | ||
replacements.SetSchemeStr("https"); | ||
replacements.SetHostStr("crlsets2.brave.com"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventually i think it would be good to move all these proxy endpoints to a single endpoint like proxy.brave.com instead of having one endpoint for every google host. that way, people who use little snitch or other firewalls will only have to whitelist one host and new proxied requests will not trigger alerts.
please add some kind of test for this |
ebbf462
to
bdb6031
Compare
https://github.com/brave/brave-core/pull/920/files#diff-58c3b6971fd1539fa4e2376e5933752eR104 |
@jumde sorry, i meant an automated test that runs as part of the test suite to check that these URLs are being rewritten as expected |
bdb6031
to
1e4a0e2
Compare
https://github.com/brave/brave-core/pull/920/files#diff-f31851c38d55f93616f9233f6874e556R71 |
return false; | ||
}); | ||
DCHECK(!is_url_blacklisted) << gurl.spec(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should enforce a blacklist here. If the URL remapping logic is solid (and backed by tests, thank you), then this check is unnecessary anyway.
EXPECT_EQ(before_url_context->new_url_spec, expected_url); | ||
EXPECT_EQ(ret, net::OK); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests LGTM
note to the merger: this should be uplift-requested to the same release that #652 is in since it fixes an issue caused by that PR. currently it is requested to be in 0.57 |
1e4a0e2
to
4518902
Compare
4518902
to
be00a23
Compare
@pilgrim-brave ready for re-review |
merging and adding uplift to 0.57 request |
Because we're planning on migrating @jumde can you merge this into |
Issue 2160: Proxy requests for CRLSets through crlsets[n].brave.com
0.58.x - dac0881 |
master: f8f2b2e |
Reverted: #986 (master and 0.58.x) |
fixes brave/brave-browser#2160
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Little Snitch
dl.google.com
or*.gvt.com
for fetching CRLSets<data-dir>/CertificateRevocation/
revoked.badssl.com
to verify certificate error is displayed.Reviewer Checklist: