News for hackers. Stuff that matters.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by djxfade on Wednesday May 19, 2021 @06:02PM (#27215105)
But Gmail is already a web app, and only supports a tiny subset of modern HTML and CSS. The limitation is of course arbitrary, it could in theory support any modern standards. But HTML mail is so quirky and full of hacks, that they probably have to do it that way to preserve compatibility. Apple's Mail app is one of the few modern mail clients that can render modern HTML/CSS
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Wednesday May 19, 2021 @10:47PM (#27216810)
Given that email is MIME (i.e. you can add multiple “bodies” to a message, with different content-types, and the email client will select the best one it can render), you’d think we could just come up with a new content-type for email meaning “HTML, but for real”, and add that to email in addition to the current “HTML, but sucky” semantics we get from text/html-typed bodies.

For a while, people would be sending both text/html and text/html-for-real, but eventually we’d maybe be able to switch to only sending text/html-for-real (while also continuing to send text/plain for fallback.)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by smichel17 on Thursday May 20, 2021 @08:02AM (#27220038)
I wish people sent text/plain as a fallback for text/html...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by blacksmith_tb on Wednesday May 19, 2021 @11:55PM (#27217204)
CSS grid email designs would be great, but we'd also get an avalanche of nightmare canvas-tag spam...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by akx on Thursday May 20, 2021 @05:07AM (#27218999)
A canvas tag won't do much without scripts, and I really don't believe any client would allow running scripts from email...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by toastal on Thursday May 20, 2021 @12:55AM (#27217525)
Maybe more people will then demand plaintext as we come full circle
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by ratww on Thursday May 20, 2021 @03:22AM (#27218353)
You can have one without another! Apple Mail supports grid, but doesn’t support canvas or script tags.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by drewzero1 on Thursday May 20, 2021 @01:17PM (#27224009)
> a new content-type for email meaning “HTML, but for real”

text/email Mozilla/5.0 (KHTML, like Gecko)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Thursday May 20, 2021 @02:57PM (#27225525)
I get what you mean, but it's not like we'd have to keep adding these on. "text/html" on email clients currently means "some specific ossified version of HTML4"; but text/html-for-real would hopefully mean "the newest and most featureful version of HTML that your rendering engine can manage." So there'd just be the one version of it.

Eventually, if everybody switched to sending text/html-for-real first, maybe the email clients could follow along and make text/html also mean "the newest and most featureful version of HTML5"; and then we could all revert to just calling it text/html.

Rather than a distinct MIME type, I believe it could also make sense to borrow the HTTP header X-Content-Type-Options: nosniff (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-...) into the MIME envelope of the text/html document, to signal that this envelope is "really" using HTML, no second-guessing. (This is how the header was used in IE8: to tell the renderer to explicitly not trigger IE historical-renderer compat mode.)

That might get into a situation where the message has two MIME bodies that are both text/html, though, and I'm not sure existing clients have been written to cope with that. A well-engineered solution would work with existing clients (by having them ignore the body of unknown-to-them media-type, and render the old fallback body of known media-type.)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by zymhan on Wednesday May 19, 2021 @08:14PM (#27215978)
> Apple's Mail app is one of the few modern mail clients that can render modern HTML/CSS

That's kinda funny given how my Calendar.app event notes are just full of unparsed HTML tags

Though I don't know which is worse, putting HTML in calendar invite descriptions, or refusing to render basic tags.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by monsieurbanana on Thursday May 20, 2021 @12:16AM (#27217326)
I vote for putting HTML in calendar invites. As worst thing, I precise.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by whakim on Wednesday May 19, 2021 @06:38PM (#27215426)
That's true, and I wish that emails could just work like everything else on the web. But simply removing Outlook and all its baggage from the equation would be a big, big improvement on the status quo.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by SilverRed on Wednesday May 19, 2021 @07:01PM (#27215576)
There are good reasons to reject a lot of it. You don't want JS running in an email for example. Or even some of the fancier CSS abilities.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by whakim on Wednesday May 19, 2021 @07:55PM (#27215888)
By "I wish that emails could just work like everything else on the web" I meant modern web HTML/CSS - I was replying to the GP - not the full set of browser capabilities such as Javascript. I suppose it's possible you'd also want to exclude certain CSS abilities, but at that point you're now diverging from the web CSS spec which isn't ideal either.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by fomine3 on Wednesday May 19, 2021 @08:46PM (#27216159)
Web standard is continuously evolving but email don't need most of them. I think whitelist approach is better than blacklist for email.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by whakim on Wednesday May 19, 2021 @09:24PM (#27216352)
Yes, but then who maintains the whitelist? What's to stop individual email providers from deciding they do/don't like certain standards? I agree that email doesn't need much of the CSS spec, but nor do the vast majority of web sites and yet we don't like it when browsers aren't standards-compliant...
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by fomine3 on Wednesday May 19, 2021 @10:45PM (#27216797)
HTML/CSS is designed to be safe for web by browser vendors and working groups. Unused HTML/CSS feature is fine as long as it's not vulnerable, but blacklist for email is problem because new feature is not designed to be safe for email.

Theoretically email client vendor can host working group like WHATWG to define standard by picking subset from web HTML/CSS. I don't know why it's not happened.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by whakim on Wednesday May 19, 2021 @11:13PM (#27216965)
Can you share some CSS vulnerabilities that would work in email but not in a browser? I can certainly think of CSS vulnerabilities that would not work in email because email can't execute javascript, but can't come up with the reverse off the top of my head. Genuinely curious here.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by fomine3 on Thursday May 20, 2021 @12:12AM (#27217298)
* Any way that reference external resource like css url() can be used as beacon. It should be blockable by client like image, but thinking how it affect is difficult if all tags are allowed.

* iframe content inside message is editable after message sent.

* Java Applet/ActiveX is almost dead, but still available. Should it be allowed on email? (for web mail on IE11/Trident)

* Sanitizing JavaScript from HTML by blacklisting isn't simple operation. Possibly attack vector. (for web mail)

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by whakim on Thursday May 20, 2021 @01:15AM (#27217654)
> * Any way that reference external resource like css url() can be used as beacon. It should be blockable by client like image, but thinking how it affect is difficult if all tags are allowed.

You can already use url() to load background images - seems like this is a solved vector.

> * iframe content inside message is editable after message sent.

Does this really increase the attack surface area, since you can't execute javascript from the iframe?

* Java Applet/ActiveX is almost dead, but still available. Should it be allowed on email? (for web mail on IE11/Trident)

No, because that's not in the HTML/CSS spec and modern browsers don't support it.

* Sanitizing JavaScript from HTML by blacklisting isn't simple operation. Possibly attack vector. (for web mail)

Seems like a solved problem considering there's currently no way to execute arbitrary javascript in webmail.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by fomine3 on Thursday May 20, 2021 @01:37AM (#27217803)
> You can already use url() to load background images - seems like this is a solved vector.

Background image with url() is very easy to be whitelisted because it's very similar to <img> tag.

> Does this really increase the attack surface area, since you can't execute javascript from the iframe?

Sorry, this concern isn't about security for browsers, but for text editable email without indication. Maybe you can argue that it's not a problem because external image is already replaceable, but IMO it's more problematic.

> No, because that's not in the HTML/CSS spec and modern browsers don't support it.

Blacklist approach means that any tags just work unless explicitly specified on blacklist. "Not in spec" won't help.

> Seems like a solved problem considering there's currently no way to execute arbitrary javascript in webmail.

That's thanks to whitelist approach.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by philistine on Wednesday May 19, 2021 @11:31PM (#27217059)
I don't think there's any HTML or CSS that is problematic in an email. The problem is Javascript.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by speleding on Thursday May 20, 2021 @05:18AM (#27219067)
The surface of HTML+CSS is pretty big by now. Perhaps you could use CSS to restyle the "From" address: hide the original content and use an :after property to put "$bank_name" there. Perhaps you can generate a unique @font url for each user to track opening of messages. Just two things of the top of my head that maybe won't work, but it would probably be a cat and mouse game for a while when security researchers start poking at it.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Wednesday May 19, 2021 @10:48PM (#27216822)
Sounds like you’re talking about the subset of HTML+CSS used in ePub. Come to think, ebooks and emails have pretty similar “richness” needs.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by craig131 on Wednesday May 19, 2021 @11:32PM (#27217065)
That's a great idea, just use the ePub standard. Never made the connection between ebook formatting and email formatting before, nice.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by shakna on Thursday May 20, 2021 @02:02AM (#27217940)
Most ePub readers are intentionally not compliant with the standard, because the standard allows way too much. Including, for example, arbitrary execution.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by dragonwriter on Wednesday May 19, 2021 @11:36PM (#27217094)
> Sounds like you’re talking about the subset of HTML+CSS used in ePub.

EPUB3 supports JS.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by derefr on Wednesday May 19, 2021 @11:55PM (#27217202)
EPUB3 is a half-baked standard that nothing actually fully supports. The JavaScript parts especially—most e-readers don’t ever plan on adding JS support, even if they nominally support EPUB3.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by zozbot234 on Wednesday May 19, 2021 @07:24PM (#27215702)
But then why have HTML email at all? You could just write in markdown.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by nexuist on Thursday May 20, 2021 @12:42AM (#27217452)
Why have HTML email in the first place? No other messaging client lets you send entire HTML documents as messages. Just send me some words and a link to click on in a proper browser. The fact that HTML email is so bloated and a nightmare to eyeballs eveywhere is (IMO) a huge reason why conversations (even professional ones) shifted over to Slack, SMS, WhatsApp, FB Messenger, etc. I want a place to talk to people, not to shitty template engines. But if you're going to automate my conversation, use words, not posters.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by SilverRed on Thursday May 20, 2021 @01:31AM (#27217771)
You're comment made me think about why we actually use slack/IM when email is just as capable and I think the answer is that I can have notifications turned on for IM and I can't do that for email. Which means I respond much slower to email.

IM is one of the last places on the internet not filled with automated crap, advertisers and spam. And to be fair, some of that automated crap I actually want and browse through at a later time but IM explicitly separates real time messages and newsletters.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by tofukid on Thursday May 20, 2021 @02:22AM (#27218019)
Email supports instant notifications, via your provider’s app or IMAP IDLE. I use Fastmail and get push notifications for email the instant it is received.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by SilverRed on Thursday May 20, 2021 @02:23AM (#27218024)
The point is if I turned on instant notifications I would go insane because they would never stop. I receive lots of emails and a lot of them are not very important or at least not urgent. While every IM I receive is something I at least want to glance at now.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by selfhoster11 on Thursday May 20, 2021 @06:06AM (#27219322)
That point, frankly, applies to some Slack workspaces too. Some of them just have too many notifications to keep track of.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by tofukid on Friday May 21, 2021 @09:51AM (#27233983)
Email notifications are flexible. I can choose to receive notifications only from contacts, search terms, or specific people.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by m0dest on Thursday May 20, 2021 @09:58AM (#27221165)
I'm intrigued by that idea. Markdown or Markdown-like subsets have proven to be sufficient for communication in a variety of media (Slack, Wikipedia, forum comments, GitHub issues/comments, etc.)

Email clients are a bit of an oligopoly, so execution would depend on which player(s) are involved. Most of these initiatives would need an "everyone but Outlook" coalition to succeed.

A few thoughts on implementation:

- Multipart MIME is still a big part of HTML mail, so it would make sense to piggypack on that support. Instead of adding a new MIME attachment for Markdown, it would make sense to extend the existing support for text/plain renditions and find some way to signal that it's Markdown. (e.g. text/plain; charset=UTF-8; variant=MarkdownMail)

- For mail clients that aren't Markdown-aware, it would be important to produce an HTML-rendered variant with a reasonable style sheet.

- A Markdown-first mail client would either need to limit formatting to Markdown or soft-block access to non-Markdown formatting. ("Custom text colors will not be visible on some devices and may be lost when replying. Continue?")

- When viewing a Markdown-enabled message, a Markdown-first mail client would render the text/plain variant in its preferred style sheet, not the HTML-rendered variant.

- When replying to a Markdown-enabled message, a Markdown-first mail client would use the text/plain variant as the source of truth for quoted replies, not the HTML-rendered variant.

A few tricky areas:

- Mail clients would need to agree on a Markdown dialect, especially for extensions like tables.

- Markdown isn't very incompatible with quoting. There would need to be a solution for inline quoting.

- For everyone's sanity, it would seem important to agree on a delimiter to separate prior messages and their headers.

- To not be worse than HTML mail, we'd really need a way to signal that a paragraph is part of a mail signature so that it can be rendered in a subtle way. As much as we might wish that mail signatures would just go away, they will continue to be used, and rendering them as standard paragraph text just makes them more distracting.

Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by jiofih on Wednesday May 19, 2021 @07:29PM (#27215735)
Not a bad idea.
Re:Internet Explorer 11 (IE11) to be retired on June 15, 2022 by Vinnl on Thursday May 20, 2021 @07:02AM (#27219633)
AFAIK Thunderbird just uses Gecko - I wonder whether it's not running into similar problems.