-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make Decent embeddable? #287
Comments
yes |
Yes, this is perfectly doable in a secure way. What you need to do is ensure that you can't perform state-changing actions on the embeddable page. So, in the URL, mark whether a page is going to be embedded through |
It's also quite easy to make a site read-only, <div class="readonly">
</div>
<style>
.readonly {
z-index: 100000;
opacity: 0;
position: fixed;
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
</style> You're placing a transparent element on top of everything, so all clicks are sent over to the We, therefore, need a way to indicate that a user is in embed mode. This could be done by having the Or we could use *gasps* JavaScript since the rest of the site relies on it (WebSockets, etc.) |
Does clickjacking allow a 'jacker' to run arbitrary JS on the target (/embed) page? Asking because we rely on localStorage currently to store the user's sessionID. |
Nope, Clickjacking is simply about channeling user interactions to the victim webpage rather than the attacker's. It does not affect JavaScript 🙂 |
Okay, how about we have our if(window.top === window.self) {
alert("You're in a read-only view.")
} This will not fire in a frame, but will fire as a top page. People shouldn't ever be trying to visit |
Could we just make /embed redirect? |
Totally, but developers who want to test the link out might get a little confuzzled. |
I'd say display a modal, then. |
@joker314 I guess I'm missing something here? Because the point is to have an embeddable, interactive chat. Put a live stream chat beside the video element, and let people type into it. OTOH I think you're talking about being able to embed the app on sites which are not necessarily the same as the client host (e.g. hosting |
Yep, okay, so new plan:
|
I think that we could add an Embed/widget page under server settings that gives you the |
I'm curious about thoughts on this. It would be nice to be able to incorporate a Decent chat into, say, a live stream page. But I don't want to cause any security issues, either. If we use iframes (and ideally we would, since they're so portable), is there a way to configure header options to only be embeddable on the same domain? That way we avoid clickjacking, etc. (Ping @joker314.)
In terms of actual design, that could be handled by making the client responsive to sizes. Most live stream viewing sites put chat in a thin, tall column beside the video; obviously sidebars and such wouldn't fit there. See #240 (actually there's not much discussion there yet, haha).
The text was updated successfully, but these errors were encountered: