deltachat / deltachat-desktop

Email-based instant messaging for Desktop.
GNU General Public License v3.0
943 stars 169 forks source link

Use Electron `setContentProtection` API on Windows and macOS #4347

Open link2xt opened 1 day ago

link2xt commented 1 day ago

Electron has a function to prevent screenshotting the application window: https://www.electronjs.org/docs/latest/api/browser-window#winsetcontentprotectionenable-macos-windows

On Windows and macOS this could be enabled by default and and option to disable it provided.

Delta Chat on Android has a similar "Screen security" option in Advanced settings, so it makes sense to have it on desktop.

Windows is introducing "Recall" and if screen capture is not prevented, disappearing messages can easily end up in the history stored on device, affecting both the user and all its contacts: https://support.delta.chat/t/opt-out-of-windows-recall-screenshotting-the-chats-on-desktop/3342

r10s commented 1 day ago

might be a nice option, however, not sure about preventing screenshots it by default. some counter args:

screenshots are very much a thing todays, and it is questionable to make it harder to get them for the majority of users that want that feature. also on android, it is possible to do screenshots by default.

for windows "recall" - afaik, ppl has to agree for that feature before - and if they did, and are at risk, they have probably much larger problems

we may also want to look at comparable apps, which default they're using, to get an idea about user expectations

link2xt commented 23 hours ago

for windows "recall" - afaik, ppl has to agree for that feature before - and if they did, and are at risk, they have probably much larger problems

The problem here is that such users put their contacts at risk by constantly screenshotting chats with them. Need to see how it works of course, if on Windows 10 the window is simply not there without any explanation that could be weird. On Android you get a toast explaining what is going on.

The first thing is to have an option at all, even if disabled by default.

we may also want to look at comparable apps, which default they're using, to get an idea about user expectations

Signal does not seems to call this function at all. Likely they are not aware it exists. Also Windows 11 is not widespread (yet), so there is some time before "AI-enabled" laptops are a threat.

r10s commented 23 hours ago

The first thing is to have an option at all, even if disabled by default

agree, that is also a good way to get experience first, if there are side effect etc. eg. on android, that does not only avoid screenshots, but also worsens the "switch app" experience, at least on some os, the content is hidden there as well

maxphilippov commented 2 hours ago

Signal does not seems to call this function at all. Likely they are not aware it exists. Also Windows 11 is not widespread (yet), so there is some time before "AI-enabled" laptops are a threat.

I had Copilot installed (although I'm not sure if it's a full install or just a shortcut which will load a full version, I cleaned it up) as part of the latest Win10 security update, so there might be a chance they retroactively and silently enable that.

As a side note, maybe we need some kind of simple 'privacy-mode' the same way games do for people who stream gameplay publicly, games can hide emails, user nicknames. I get that the biggest issue is still leaking messages, but maybe that's some option for people who still want to make screenshots without the need to blur out all the email addresses on the screenshot.