deltachat / deltachat-desktop

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

mailto link inside webxdc causes blank page #3355

Closed adbenitez closed 9 months ago

adbenitez commented 11 months ago

image

Simon-Laux commented 11 months ago

we would need to upgrade electron for this or get rid of the iframe (FILL 500 hack)

Simon-Laux commented 11 months ago

this requires electron 25+

Simon-Laux commented 11 months ago

https://github.com/deltachat/deltachat-desktop/pull/3381

WofWca commented 10 months ago

get rid of the iframe (FILL 500 hack)

How would that work? I see that the wrapper is still used in #3381.

It looks to me like this piece of code does nothing, after the introduction of the WebRTC exfiltration mitigation:

https://github.com/deltachat/deltachat-desktop/blob/853b584251a5dacf60ebc616f7fb10edffb5c5e5/src/main/index.ts#L247-L264

Because all navigation is prevented anyway:

https://github.com/deltachat/deltachat-desktop/blob/f5f073a8f6c98082cb131bc8eef774c5edaadc7d/src/main/deltachat/webxdc.ts#L367-L370

I might be wrong though.

Simon-Laux commented 10 months ago

We need to either get rid of the frame again or use an electron version that has the "will-frame-navigate" event.

Someone could also attempt to backport the event to electron 22, but that might be to complicated.

WofWca commented 10 months ago

How does "will-frame-navigate" help?

We want an <iframe> because:

Does the new Electron allow to solve the reload problem?

Simon-Laux commented 10 months ago

How does "will-frame-navigate" help?

It allows us to use the code you mentioned in your previous comment again. Or have I missed something?

WofWca commented 10 months ago

Yeah, for "will-frame-navigate" that's true (I think), but I'm asking about how it's gonna help get rid of the wrapper <iframe>.

Simon-Laux commented 10 months ago

It won't, I said we "either" need one or the other, not both.

WofWca commented 10 months ago

Oh I see. How does the new Electron version allow to get rid of the 500 hack then?

Simon-Laux commented 10 months ago

How does the new Electron version allow to get rid of the 500 hack then?

no, this is just about the mailto: stuff discussed in this issue.

My communication seems lacks here, please tell me how to improve it.

WofWca commented 10 months ago

Ok, it's my bad, sorry 🤦‍♀️ I read

we would need to upgrade electron for this or get rid of the iframe (FILL 500 hack)

as "for this to get rid". I thought you have an idea of how to get rid of the <iframe>, it's why I keep asking.

Simon-Laux commented 9 months ago

looks like we did not even need the electron upgrade, in the end it was contents.setWindowOpenHandler()