summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. 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)
commitd9e53698d50c534ee33512c55ac3531481c32b72 (patch)
tree0998d3a804c22c8ecd02790b6361b1b82b8eb6bc
parent209c195d5b94de50ef5b727a1294b5130b7d46fa (diff)
downloadepirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.zip
epirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.tar.gz
epirts.js-d9e53698d50c534ee33512c55ac3531481c32b72.tar.bz2
Epirts.setPublishableKey(): Improve validation
-rw-r--r--epirts.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/epirts.js b/epirts.js
index 1e03ef4..9a6334d 100644
--- a/epirts.js
+++ b/epirts.js
@@ -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;