-
Notifications
You must be signed in to change notification settings - Fork 15k
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: make desktopCapturer main-process-only #30720
Conversation
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.
Breaking changes document needs to be updated.
And this needs to be deprecated first rught?
@MarshallOfSound yep, i thought i'd open this first instead of an issue, to gauge a response before going through the longer process of deprecation/etc. are you on board with removing this, ultimately? |
Yes 👍 It's just a convenience IPC wrapper at the moment that is trivial to implement but is currently non trivial to intercept and protect against abuse. removing makes sense. |
we should merge lib/browser/api/desktop-capturer.ts with lib/browser/desktop-capturer.ts |
that's not entirely true, it depends on electron/lib/common/type-utils.ts Lines 39 to 110 in f9c6f9a
https://github.com/electron/electron/blob/main/docs/api/web-contents.md#event-desktop-capturer-get-sources |
draft until 16.x forks |
@nornagon also remove |
@nornagon 16-x-y was branched off, we can land this now in main |
nornagon is off until next year, so we should either pick this up, or wait for some time. |
9116c2c
to
5670390
Compare
@zcbenz taking it over. rebased and conflicts resolved |
ac09637
to
2469642
Compare
Release Notes Persisted
|
* feat: make desktopCapturer main-process-only * remove --enable-api-filtering-logging * remove test * merge lib/browser/api/desktop-capturer.ts with lib/browser/desktop-capturer.ts * remove desktop-capturer-get-sources event * fix specs * getSources needs to be async Co-authored-by: Milan Burda <milan.burda@gmail.com>
* feat: make desktopCapturer main-process-only * remove --enable-api-filtering-logging * remove test * merge lib/browser/api/desktop-capturer.ts with lib/browser/desktop-capturer.ts * remove desktop-capturer-get-sources event * fix specs * getSources needs to be async Co-authored-by: Milan Burda <milan.burda@gmail.com>
* feat: make desktopCapturer main-process-only * remove --enable-api-filtering-logging * remove test * merge lib/browser/api/desktop-capturer.ts with lib/browser/desktop-capturer.ts * remove desktop-capturer-get-sources event * fix specs * getSources needs to be async Co-authored-by: Milan Burda <milan.burda@gmail.com>
Description of Change
This makes
desktopCapturer.getSources
a main-process-only method.This is a security precaution; it prohibits renderers from being able to
request images from the desktop without explicit permission from the main
process.
Checklist
npm test
passesRelease Notes
Notes:
desktopCapturer.getSources
is now only available in the main process.