-
Notifications
You must be signed in to change notification settings - Fork 879
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
Add Ethereum and Solana feature policy #13783
Conversation
31f1e98
to
9c51eca
Compare
patches/third_party-blink-renderer-core-exported-web_document.cc.patch
Outdated
Show resolved
Hide resolved
6366d96
to
c01ffb6
Compare
3aa96c2
to
9cfa6dd
Compare
+ { | ||
+ name: "Solana", | ||
+ permissions_policy_name: "solana" | ||
+ }, |
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.
note to @bridiver this errors out if I try to combine it into 1 line. Not sure how it's being parsed but it's very sensitive.
9cfa6dd
to
9be16ab
Compare
chromium_src/third_party/blink/renderer/core/exported/web_document.cc
Outdated
Show resolved
Hide resolved
298976b
to
519577a
Compare
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.
chromium_src
and patches
LGTM
chromium_src/chrome/browser/permissions/chrome_permissions_client.cc
Outdated
Show resolved
Hide resolved
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.
LGTM
7e07542
to
505ee55
Compare
505ee55
to
12ba7b8
Compare
12ba7b8
to
f339d32
Compare
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.
.
render_frame()->GetWebFrame()->IsCrossOriginToOutermostMainFrame()) || | ||
!render_frame()->GetWebFrame()->GetDocument().IsSecureContext()) { | ||
// Wallet provider objects should only be created in secure contexts | ||
if (!render_frame()->GetWebFrame()->GetDocument().IsSecureContext()) { |
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.
Is this case already tested?
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 we guarding/testing against these case
Top level http://a.com/ with <iframe src=”[https://a.com](http://a.com/)”> -> blocked (insecure/3p)
Top level [https://b.com](http://a.com/) with <iframe src=”http://a.com/”> with <iframe src=”[https://b.com](http://a.com/)”> -> blocked (insecure)
Top level [https://a.com](http://a.com/) with <iframe src=”[https://a.com](http://a.com/)” sandbox> -> blocked (sandbox)
Top level data://foo with <iframe src=”data://bar”> -> blocked (insecure)
Top level file://foo with <iframe src=”file://bar”> -> blocked (3p)
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.
Top level https://a.com with <iframe src=”[https://a.com](http://a.com/)” sandbox> -> blocked (sandbox)
Spent too long trying to find a way to test this but the test relies on running JavaScript and JavaScript can't be run. I don't think we need to test that the Ethereum object exists here because no JS exists at all.
I'll have another update shortly with some others.
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.
For the other ones rebased the missing ones (top level insecure) here:
f6dae30
f339d32
to
f6dae30
Compare
f6dae30
to
4980b31
Compare
4980b31
to
fb5df57
Compare
Resolves brave/brave-browser#23572
Resolves brave/brave-browser#23710
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
I think there is sufficient coverage in automated tests and this would be too time consuming to manually test.