Stripe moves to JSONP; adds CORS support
stripe.com
stripe.com
IE6, as usual, doesn’t support postMessage.
IE6 and IE7 both lack CORS support, while IE8 and IE9 have broken implementations
Oh what mankind could have achieved by now if we weren't so occupied making our websites work in IEx.
In my experience it is totally absurd to think that you can just write "standards compliant HTML" and expect it to be rendered correctly on IE6 or 7 in any meaningful way anyway, you will always need to change your HTML and CSS to specifically support those browsers and realistically any browser that you want to support, the standards just are not uniformly implemented.
So, a malicious party could create tokens with CC information, but without the private key they'd have no way to use them.
I wrote a summary of the issues with JSONP on StackOverflow awhile ago: http://stackoverflow.com/a/1392153
Edit: I don't disagree with their decision, I just imagine it wasn't an easy one.
> Unfortunately, that’s not quite enough for Stripe.js. IE6 and IE7 both lack CORS support, while IE8 and IE9 have broken implementations. IE10 is the only version with a non-buggy CORS implementation. Obviously, compatibility is paramount for Stripe.js — we want to support all major browsers, right down to IE6—and so we needed to look elsewhere.
I'd rather have a functioning solution that "ignores basic REST principles" and lets me accept money from IE users than a principled library that requires the latest greatest browser to process transactions with.
However, just because I trust a service to process payments or do any other specific business-critical task doesn't mean I trust that service to run arbitrary Javascript code in the context of my site. Customers may have significantly more sensitive data than just payment information, and third-party Javascript represents a major issue. I need the ability to confidently say to customers that no third-party service has access to their private data.
Given this new approach, I'd have to sandbox payment code off on a separate domain that has no access to other user data.
You...include their Javascript on your site to even be able to make the JSONP calls in the first place. Their "arbitrary Javascript" is on your domain already.
You certainly could audit it, locally mirror it, and then do that every time they publish an update, but are you actually going to do that?
Yes, absolutely. For any third-party Javascript, I'd either mirror it locally and review it for safety, or sandbox it on a separate untrusted domain that has no access to customer data.
So yes, it's a good idea to always check any third-party code you use into your own source control system. I would hope everyone does that.
(The Web Intent polyfill is implemented with the same postMessage hack they were originally using, so technically they could just use the web intent and nothing else. Though in practice, it probably doesn't handle cross-domain iFrame messaging for the old browsers that don't support postMessage.)
Attackers can see the hostname of the machine you're talking to, but not because it's an "unencrypted" part of the SSL packet somehow.
Yes. Obviously, DNS resolution of the host happens in the clear, but SSL handshake takes place before the path is transmitted.
Server Name Indication (http://en.wikipedia.org/wiki/Server_Name_Indication) works around this by sending the host name during the TLS handshake, so that multiple domains can use SSL on the same IP address. In this case, only the host name is sent in the clear. The whole HTTP request and response are still encrypted.
I'm just surprised that a tech company like Stripe w/ such a polished site and attention to UX would not find a way to optimize this.