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

refactor: implement clipboard APIs without the remote module on Linux #17200

Merged
merged 1 commit into from Mar 16, 2019

Conversation

@miniak
Copy link
Contributor

commented Mar 2, 2019

Description of Change

Fixes #15112

After this change, the only remaining internal use of the remote module in Electron is WebViewElement.prototype.getWebContents, which is addressed in #17201.

This finally makes it possible to consider disabling the remote module by default to improve security.

Checklist

/cc @nornagon, @MarshallOfSound

Release Notes

Notes: The clipboard module in renderers no longer depends on the remote module on Linux.

@miniak miniak requested review from MarshallOfSound, alexeykuzmin and nornagon and removed request for alexeykuzmin Mar 2, 2019

@miniak miniak changed the title refactor: implement clipboard APIs without the remote module refactor: implement clipboard APIs without the remote module on Linux Mar 2, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch 2 times, most recently from 0758827 to 4094edd Mar 2, 2019

Show resolved Hide resolved lib/common/value-utils.js Outdated

@miniak miniak force-pushed the miniak/clipboard-linux branch 2 times, most recently from 94b4b11 to 9339a60 Mar 2, 2019

@miniak miniak requested a review from ckerr Mar 2, 2019

@electron-cation electron-cation bot removed the new-pr 🌱 label Mar 3, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch 2 times, most recently from 84e9f6e to bb42f92 Mar 3, 2019

@ppontes

ppontes approved these changes Mar 4, 2019

Show resolved Hide resolved atom/common/api/atom_api_native_image.cc Outdated

@miniak miniak force-pushed the miniak/clipboard-linux branch from bb42f92 to a1ecc61 Mar 4, 2019

@miniak miniak self-assigned this Mar 4, 2019

@miniak

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

@nornagon, @MarshallOfSound can you please review?

Show resolved Hide resolved lib/browser/ipc-main-internal-utils.ts Outdated
Show resolved Hide resolved lib/browser/rpc-server.js
Show resolved Hide resolved lib/common/api/clipboard.js Outdated

@miniak miniak force-pushed the miniak/clipboard-linux branch from a1ecc61 to cc0dcb1 Mar 6, 2019

@miniak miniak requested a review from nornagon Mar 6, 2019

@miniak

This comment has been minimized.

Copy link
Contributor Author

commented Mar 6, 2019

@nornagon comments addressed

@electron electron deleted a comment Mar 7, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch 4 times, most recently from 5274863 to 42f5c99 Mar 8, 2019

@miniak

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

@nornagon I've added a check for the buffer size. To create a huge image you have to pass a huge buffer to the main process, which will probably OOM the process on the IPC layer already.

@miniak miniak force-pushed the miniak/clipboard-linux branch 3 times, most recently from 6aa8e06 to 33e97fa Mar 9, 2019

@miniak miniak changed the base branch from master to miniak/native-image-bitmap Mar 11, 2019

@miniak miniak force-pushed the miniak/native-image-bitmap branch 2 times, most recently from 8c4f6bb to de3e18f Mar 11, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch from 33e97fa to 63ee939 Mar 11, 2019

@miniak miniak force-pushed the miniak/native-image-bitmap branch 3 times, most recently from 3e03037 to df45afd Mar 11, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch from 63ee939 to e266a65 Mar 11, 2019

@miniak miniak force-pushed the miniak/native-image-bitmap branch 2 times, most recently from ad99925 to 019fcf8 Mar 12, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch from e266a65 to 00472bd Mar 14, 2019

@miniak miniak changed the base branch from miniak/native-image-bitmap to master Mar 14, 2019

@miniak miniak force-pushed the miniak/clipboard-linux branch from 00472bd to eb1963b Mar 14, 2019

@miniak

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2019

@nornagon, @MarshallOfSound can you please have another look?

@nornagon
Copy link
Contributor

left a comment

Ah sorry, had this open in a tab and got distracted. LGTM! Thanks for the refactors.

@codebytere codebytere merged commit 3a091cd into master Mar 16, 2019

13 checks passed

Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190314.15 succeeded
Details
electron-arm64-testing Build #20190314.15 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Mar 16, 2019

Release Notes Persisted

The clipboard module in renderers no longer depends on the remote module on Linux.

@codebytere codebytere deleted the miniak/clipboard-linux branch Mar 16, 2019

Kiku-Reise added a commit to Kiku-Reise/electron that referenced this pull request May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.