This was discussed a little in a private chat. I researched whether we can do it.
The following patch enables it on Desktop:
Desktop patch
diff --git a/packages/target-electron/src/deltachat/webxdc.ts b/packages/target-electron/src/deltachat/webxdc.ts
index 212162d4d..1d67dfa39 100644
--- a/packages/target-electron/src/deltachat/webxdc.ts
+++ b/packages/target-electron/src/deltachat/webxdc.ts
@@ -1068,6 +1068,10 @@ const makeResponse = ({
if (mime_type) {
headers.append('content-type', mime_type)
}
+
+ headers.append('Cross-Origin-Opener-Policy', 'same-origin')
+ headers.append('Cross-Origin-Embedder-Policy', 'require-corp')
+
return new Response(body, {
...responseInit,
headers,
In theory these headers are supposed to put more restrictions on the web page (i.e. ensure better cross-origin isolation), which allows to use more powerful features. So one might think that adding these headers is basically a no-brainer.
However, one thing that needs to be kept in mind and investigated is the fact that WebXDC promises no exfiltration which is what makes it different from regular websites. More concretely, we need to keep in mind that malicious app instances in different chats might try to communicate via e.g. timing side-channels.
One idea is to put this behind a permission.
And possibly also disallow running other WebXDC apps at the same time to disable covert communication. But that might not be enough as I guess a malicious website running in the browser could also part take in the exfiltration process.