diff options
author | P. J. McDermott <pj@pehjota.net> | 2015-03-16 00:11:12 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2015-03-16 00:11:12 (EDT) |
commit | d9e53698d50c534ee33512c55ac3531481c32b72 (patch) | |
tree | 0998d3a804c22c8ecd02790b6361b1b82b8eb6bc | |
parent | 209c195d5b94de50ef5b727a1294b5130b7d46fa (diff) | |
download | epirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.zip epirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.tar.gz epirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.tar.bz2 |
Epirts.setPublishableKey(): Improve validation
-rw-r--r-- | epirts.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -132,7 +132,7 @@ var Stripe = Epirts = (function() { if (typeof key !== 'string') { throw new Error('Invalid publishable key'); } - if (!key.match(/^pk_[A-Za-z0-9_]+/)) { + if (!key.match(/^pk_(test|live)_[A-Za-z0-9]+/)) { throw new Error('Invalid publishable key'); } _key = key; |