News for hackers. Stuff that matters.
Re:Stripe Button (beta) by pfraze on Tuesday October 09, 2012 @04:16PM (#4633700)
EDIT: to avoid any FUD, there's no problem with the URL; as the replies say, the path of the target URL is encrypted under SSL.

---

ORIGINAL: I have a question about the security of the button, though I may be wrong. The outgoing request is a GET with the credit card info in plain-text as a query parameter. With it went all of the cookies in the origin's domain.

GET https://api.stripe.com/v1/tokens?key=W1xyC0XilnJTkz52noGj1Hh...

The SSL keeps the cookies safe from loggers, but not from stripe. The URL, however, is not protected from anybody, right?

Re:Stripe Button (beta) by Cushman on Tuesday October 09, 2012 @04:22PM (#4633731)
The path part of the URL is encrypted along with the rest of the request. Only the DNS lookup (i.e., the hostname) is in the clear.
Re:Stripe Button (beta) by mjschultz on Tuesday October 09, 2012 @05:57PM (#4634169)
Wouldn't stripe's server logs also have the get params in cleartext?
Re:Stripe Button (beta) by cmaggard on Tuesday October 09, 2012 @06:09PM (#4634200)
They're most likely being scrubbed out, same as you would with passwords.
Re:Stripe Button (beta) by pfraze on Tuesday October 09, 2012 @04:24PM (#4633745)
Okay, thanks for clearing that up for me.
Re:Stripe Button (beta) by Cushman on Tuesday October 09, 2012 @05:38PM (#4634098)
Not at all, sorry for piling on :) I swear there were no other replies when I commented.
Re:Stripe Button (beta) by boucher on Tuesday October 09, 2012 @04:34PM (#4633789)
Cookies are only sent for the domain involved in the request, so only stripe.com cookies would be sent to Stripe, not any cookies for the domain hosting this button.
Re:Stripe Button (beta) by naz on Tuesday October 09, 2012 @04:22PM (#4633729)
HTTPS URLs are encrypted along with the rest of the request.
Re:Stripe Button (beta) by callmevlad on Tuesday October 09, 2012 @09:07PM (#4634623)
If a web designer adds this script to a non-HTTPS page, is that still the case?
Re:Stripe Button (beta) by boucher on Tuesday October 09, 2012 @09:15PM (#4634649)
Yes, the request is still encrypted. However, the original page will be subject to man in the middle attacks, which is why Stripe requires that payment pages using the Stripe Button or Stripe.js are served with SSL.
Re:Stripe Button (beta) by untog on Tuesday October 09, 2012 @04:45PM (#4633837)
Still seems like a bad idea to use GET, though- those URLs often appear in logs. POST bodies do not.
Re:Stripe Button (beta) by toomuchtodo on Tuesday October 09, 2012 @07:31PM (#4634419)
DevOps here. You scrub those out.
Re:Stripe Button (beta) by k3n on Wednesday October 10, 2012 @12:01AM (#4634993)
PCI compliance largely requires that this such data never exist in the first place. Perhaps you can get by with scrubbing after-the-fact if the disk is encrypted, but logs are still "data at rest" and on an unencrypted filesystem I don't see how you could be compliant.
Re:Stripe Button (beta) by tesseract on Wednesday October 10, 2012 @02:02AM (#4635237)
Most webservers that I am familiar with have configurable log formatting, so you could prevent it from being logged in the first place.
Re:Stripe Button (beta) by k3n on Wednesday October 10, 2012 @10:32AM (#4636454)
Yes, but the guy I replied to said he scrubbed it, which implies that they did not prevent anything from being logged, but instead they cleaned it up afterwards. Thus the reason for me saying what I did.
Re:Stripe Button (beta) by toomuchtodo on Wednesday October 10, 2012 @12:51PM (#4637156)
The logs sit on a ramdisk before being scrubbed; power removed before scrubbing? Logs are lost, but PCI compliance is maintained.
Re:Stripe Button (beta) by jaemccall on Tuesday October 09, 2012 @04:24PM (#4633743)
SSL encrypts the query string. The only thing in the clear on the wire is the domain name (api.stripe.com). Although there may be other ways for GET query data to leak out (bookmarks, plugins...)
Re:Stripe Button (beta) by tlrobinson on Tuesday October 09, 2012 @07:30PM (#4634415)
Even the domain name (in the Host header) will be encrypted (unless SNI is used? http://en.wikipedia.org/wiki/Server_Name_Indication)
Re:Stripe Button (beta) by mooism2 on Wednesday October 10, 2012 @03:19AM (#4635410)
The domain name is unencrypted in the dns lookup.
Re:Stripe Button (beta) by jsilence on Wednesday October 10, 2012 @03:37AM (#4635449)
This is OT, but actually I wondered why there is no dnss equivalent to https. Leaking the domains you visit through dns queries is also a problem for TOR and other anonymity systems. Usually the DNS resolver one uses is provided by the ISP. Of course you can change that, but then still the unencrypted DNS queries are sent through central points on the ISP side, making it very easy for them to connect your account with the domains you visit.
Re:Stripe Button (beta) by masklinn on Wednesday October 10, 2012 @10:12AM (#4636375)
> actually I wondered why there is no dnss equivalent to https.

There is one by djb: http://dnscurve.org/

OpenDNS implemented it in 2010 (they call their implementation DNSCrypt, it usually requires an OS extension)

Re:Stripe Button (beta) by jedisct1 on Friday October 12, 2012 @12:48AM (#4643856)
The German Privacy Foundation has been offering DNS-over-SSL and DNS-over-HTTPS for quite a long time.

OpenBSD accepts a "tcp" option in the /etc/resolv.conf file in order to force connections to use TCP so that they can easily be tunneled over SSH.

The popular Unbound caching resolver can communicate over SSL to an upstream resolver, and there is even a nice GUI: dnssec-trigger. NLNet provides a public resolver that of course supports this protocol.

dnscurve is a protocol for authenticating and encrypting data between an authoritative server and a resolver.

dnscrypt is a different protocol (although partly based on the same crypto primitives as dnscurve) for authenticating and encrypting data between a resolver and a client.

OpenDNS implemented dnscurve in 2010, and dnscrypt in 2011.

All these protocols have issues in the real world, due to routers and firewalls intercepting DNS traffic, and dropping encrypted queries. Some broken devices and resolvers are even breaking DNSSEC (stripping records), but this is far less common.

A workaround is to use a different port and protocol, typically TCP port 443. Or to use encapsulation in TXT records, which has different issues.

dnscrypt's successor, called dnssig, is also being worked on in order to always offer authentication, and optional encryption.

Re:Stripe Button (beta) by aneth4 on Tuesday October 09, 2012 @04:23PM (#4633734)
The path and parameters of the URL are part of the HTTP conversation that is encrypted.

In a simple sense, only the host name and IP address are not protected.

Re:Stripe Button (beta) by lftl on Tuesday October 09, 2012 @06:22PM (#4634254)
Isn't the hostname encrypted as well? My understanding was that's the reason you have to have a unique IP for SSL and can't rely on a vhost setup.
Re:Stripe Button (beta) by jonknee on Tuesday October 09, 2012 @04:22PM (#4633730)
That is interesting, the form is a POST, must be Javascript doing the GET in its place. I wonder what the technical advantage of GET is in this case.
Re:Stripe Button (beta) by exogen on Tuesday October 09, 2012 @04:43PM (#4633824)
The technical advantage is getting around the same-origin policy by using JSONP (which by its nature can only be used with GET requests for the script).
Re:Stripe Button (beta) by jtolj on Tuesday October 09, 2012 @04:42PM (#4633821)
Maybe has something to do with this: https://stripe.com/blog/stripejs-and-jsonp (they mention JSONP only supporting GET requests)?
Re:Stripe Button (beta) by jonknee on Tuesday October 09, 2012 @11:18PM (#4634891)
Yup. Duh.