This commit is contained in:
Christopher Jeffrey 2016-07-15 15:24:37 -07:00
parent d4356e6255
commit 11947a6ba8
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 3 additions and 4 deletions

View File

@ -2671,5 +2671,7 @@ utils.isAlpha = function isAlpha(key) {
if (typeof key !== 'string')
return false;
// We allow /-~ (exclusive), 0-} (inclusive)
return key.length !== 0 && /^[\u0030-\u007d]+$/.test(key);
return key.length > 0
&& key.length <= 64
&& /^[\u0030-\u007d]+$/.test(key);
};

View File

@ -579,9 +579,6 @@ WalletDB.prototype.auth = function auth(id, token, callback) {
var self = this;
var wallet;
if (!id)
return callback(new Error('Wallet not found.'));
this._get(id, function(err, wallet) {
if (err)
return callback(err);