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
feat: provide the frame URL with permission requests and checks #18757
Conversation
@@ -284,15 +284,16 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => { | |||
#### `ses.setPermissionRequestHandler(handler)` | |||
|
|||
* `handler` Function | null | |||
* `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. | |||
* `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin. |
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.
@MarshallOfSound @felixrieseberg would it be productive to provide a snippet showing an example of this?
Also provides a handy isMainFrame property to determine if it is an iframe making the request
8420cf8
to
5038721
Compare
Release Notes Persisted
|
I was unable to backport this PR to "4-2-x" cleanly; |
I was unable to backport this PR to "5-0-x" cleanly; |
I was unable to backport this PR to "3-1-x" cleanly; |
I have automatically backported this PR to "6-0-x", please check out #18772 |
* feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
A maintainer has manually backported this PR to "5-0-x", please check out #18773 |
* feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
A maintainer has manually backported this PR to "3-1-x", please check out #18774 |
* feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
…) (#18773) * feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
* feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
…) (#19204) * feat: provide the frame URL with permission requests and checks Also provides a handy isMainFrame property to determine if it is an iframe making the request * chore: refactor to use base::Value * chore: use Set<Type>Key over SetPath
Fixes #18755
Users need to be able to know where the origin of the permission request is.
Notes: Added
requestingUrl
andisMainFrame
properties to the permission request and permission check handlers details objects so that apps can check the origin of the requesting frame rather than the root frame.