Re:Show HN: Super Mail Forward, an HTML email that evolves a...
by Pxtl on Thursday January 21, 2016 @11:36AM
(#10946333)
Oh man, that is a dream. I had no idea that this was a thing. Too bad iframes themselves are kind of tricky to size correctly or I'd be using this willy-nilly. Skip sanitizing HTML and use a full sandboxed HTML iFrame for every comment on a user forum!
[ Parent
| on HN ]
Re:Show HN: Super Mail Forward, an HTML email that evolves a...
by mschuster91 on Thursday January 21, 2016 @12:09PM
(#10946585)
> Too bad iframes themselves are kind of tricky to size correctly
You could use an injected JS (postMessage with the iframe window height) and update the iframe height from the outside. And for the content you should just strip any script tags so you can safely allow scripting.
You should strip script tags in any case so that someone cannot use an API call which outputs raw comments as a delivery vector.
Also, you're putting users without sandbox attribute support on risk of being exploited... so you'd have to switch between two paths for display.
Re:Show HN: Super Mail Forward, an HTML email that evolves a...
by Pxtl on Thursday January 21, 2016 @01:08PM
(#10947042)
> Also, you're putting users without sandbox attribute support on risk of being exploited... so you'd have to switch between two paths for display.
An evil part of me considers that a feature, not a bug.
And as for stripping script tags, I'm always reminded of this story:
http://blog.codinghorror.com/protecting-your-cookies-httponl...