News for hackers. Stuff that matters.
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by mschuster91 on Thursday January 21, 2016 @10:30AM (#10945800)
Ironically, Lotus Notes Webmail is the only client I have seen so far that actually uses iframes to display HTML emails. If webmails just could embed the HTML content into an iframe with the proper sandbox attributes... nods off and dreams
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by vortico on Thursday January 21, 2016 @11:07AM (#10946127)
Wow, you could embed entire videos with the data: uri, or run entire web apps with inline javascript with Lotus Notes if they don't sanitize it. Or completely breach their privacy by scanning their LAN for webcam URLs or taking screenshots with WebGL textures using Nvidia driver bugs... nods off and dreams
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by mschuster91 on Thursday January 21, 2016 @11:21AM (#10946227)
No, that doesn't work with proper sandbox attribute. To quote w3schools (http://www.w3schools.com/tags/att_iframe_sandbox.asp):

When the sandbox attribute is present, and it will:

* treat the content as being from a unique origin

* block form submission

* block script execution

* disable APIs

* prevent links from targeting other browsing contexts

* prevent content from using plugins (through <embed>, <object>, <applet>, or other)

* prevent the content to navigate its top-level browsing context

* block automatically triggered features (such as automatically playing a video or automatically focusing a form control)

I'd say alone blocking scripts, form submits, preventing links to change other contents and checking if there's behavior stuff in the CSS (which facilitates Javascript injection) is enough to have a secure webmail display. Responsive webmails \o/

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!
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...

Re:Show HN: Super Mail Forward, an HTML email that evolves a... by JoBrad on Thursday January 21, 2016 @05:12PM (#10948862)
Does this prevent a page from positioning an element over another element, outside of its frame?
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by vortico on Thursday January 21, 2016 @11:27AM (#10946268)
Interesting, I wasn't aware of this.
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by tehlike on Thursday January 21, 2016 @11:11AM (#10946154)
Isn't that something any website can do right now?
Re:Show HN: Super Mail Forward, an HTML email that evolves a... by vortico on Thursday January 21, 2016 @11:35AM (#10946330)
I don't know if you can take advantage of the random Nvidia texture leak in Linux with WebGL (I've seen it done with OpenGL), but yes. Internet users typically need to have at least some trust in the sites they visit because indeed, bad sites can do bad things to your privacy.