Skip to content
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: also pass securityOrigin to media permissions request handler #31357

Merged
merged 1 commit into from
Oct 13, 2021
Merged

feat: also pass securityOrigin to media permissions request handler #31357

merged 1 commit into from
Oct 13, 2021

Conversation

mserrano
Copy link
Contributor

@mserrano mserrano commented Oct 8, 2021

For media requests, the handler passed to setPermissionRequestHandler seems to always get a reference to the top-level frame and the top-level URL, and is not passed the request's security_origin. For consistency with setPermissionCheckHandler's handling of this case for media requests, pass the request's security_origin as a new securityOrigin field in details to enable disambiguation.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes -> ran under e test --runners=main, everything seemed to behave just as it did before the change
  • tests are added
  • relevant documentation is changed or added
  • PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.

Release Notes

Notes: Began passing securityOrigin in details for permission request handlers for media requests in addition to permission check handlers.

@welcome
Copy link

welcome bot commented Oct 8, 2021

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Oct 8, 2021
@mukulhase
Copy link

@MarshallOfSound

Copy link
Member

@zcbenz zcbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API looks good to me.

@zcbenz zcbenz changed the title fix: also pass securityOrigin to media permissions request handler feat: also pass securityOrigin to media permissions request handler Oct 11, 2021
@zcbenz
Copy link
Member

zcbenz commented Oct 11, 2021

I'm changing this from fix to feat since it changes the API interface.

@zcbenz zcbenz added no-backport semver/minor backwards-compatible functionality labels Oct 11, 2021
@codebytere
Copy link
Member

API LGTM

@codebytere
Copy link
Member

I think we do want to potentially backport this cc @zcbenz

@MarshallOfSound MarshallOfSound added the fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases label Oct 12, 2021
@electron-cation electron-cation bot removed api-review/requested 🗳 new-pr 🌱 PR opened in the last 24 hours labels Oct 12, 2021
@mserrano
Copy link
Contributor Author

My bad on the fix vs feat thing! Thanks for fixing that.

Just wanted to check in on if there was anything anyone was waiting for me for on this PR: is there anything I should be doing on this right now?

@jkleinsc
Copy link
Contributor

Merging as CI failures are known flake unrelated to this PR.

@jkleinsc jkleinsc merged commit b2a2b07 into electron:main Oct 13, 2021
@welcome
Copy link

welcome bot commented Oct 13, 2021

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Oct 13, 2021

Release Notes Persisted

Began passing securityOrigin in details for permission request handlers for media requests in addition to permission check handlers.

@trop trop bot removed the target/16-x-y label Oct 13, 2021
@trop
Copy link
Contributor

trop bot commented Oct 13, 2021

I have automatically backported this PR to "15-x-y", please check out #31417

@jkleinsc
Copy link
Contributor

/trop run backport-to 14-x-y

@trop
Copy link
Contributor

trop bot commented Oct 14, 2021

The backport process for this PR has been manually initiated - sending your PR to 14-x-y!

@jkleinsc
Copy link
Contributor

/trop run backport-to 13-x-y

@trop
Copy link
Contributor

trop bot commented Oct 14, 2021

The backport process for this PR has been manually initiated - sending your PR to 13-x-y!

@trop
Copy link
Contributor

trop bot commented Oct 14, 2021

I have automatically backported this PR to "14-x-y", please check out #31436

@trop
Copy link
Contributor

trop bot commented Oct 14, 2021

I have automatically backported this PR to "13-x-y", please check out #31437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases semver/minor backwards-compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants