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

Allows Iframe in discussions view #451

Open
eMerzh opened this issue Oct 11, 2023 · 7 comments
Open

Allows Iframe in discussions view #451

eMerzh opened this issue Oct 11, 2023 · 7 comments

Comments

@eMerzh
Copy link

eMerzh commented Oct 11, 2023

Hello,

it seems that the editor support iframes, but the backend will strip them down ...

i understand that the issue is that we don't really want to have any security issue, but i guess adding a few safe arguments should make the soft pretty isolated from the included page... and if really it's a big deal, maybe it can be an admin flipped toggle?

@philippejadin
Copy link
Member

philippejadin commented Oct 12, 2023 via email

@eMerzh
Copy link
Author

eMerzh commented Oct 12, 2023

Yes i was trying to include a Umap map into a discussion, then google sheet doc...
Iframe are very common ton share those kind of info...
What is a bit strange, is that the editor lets you include them, display them, then once you are in view they are simply stripped...

@philippejadin
Copy link
Member

philippejadin commented Oct 12, 2023 via email

@eMerzh
Copy link
Author

eMerzh commented Oct 12, 2023

Cool thanks...
I feel that regarding Iframe security , it's more about avoiding beeing included (to avoid click jacking)
or settings the good iframe parameters (sandbox, allowXX... ) to avoid the frame beeing able to navigate or go fullscreen...
aside from that...

@philippejadin
Copy link
Member

I'm a bit reluctant at allowing iframes in user submitted content. Bad feelings about that :=)
The best way imvho would be to extend https://github.com/mpratt/Embera/tree/master which is the library I use for embeds, and add more providers to it.

@eMerzh
Copy link
Author

eMerzh commented Oct 16, 2023

hum, I see that iframe can be scary...
but i don't think the embera is a real solution to this.... like it has only a handfull of sites (eventhough that list could grow , it doesn't support a lot of open sites),
but you might have decentralized platforms that are almost by definition an anti pattern for this 🤔
like, would you (them) add a resolver for every mastodon instance?

Maybe an alternative is to get the src attribute as an URL then display it and manage the sandbox attribute ourselves.
maybe https://web.dev/articles/sandboxed-iframes?hl=fr can help you :)

@philippejadin
Copy link
Member

philippejadin commented Oct 16, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants