verify token type

This commit is contained in:
Girish Ramakrishnan
2016-10-09 00:23:23 -07:00
parent 6c1c7e74c1
commit da5e40db66

View File

@@ -321,6 +321,8 @@ function setDnsConfig(dnsConfig, callback) {
};
validator = function (caasConfig, next) { return next(); };
} else if (dnsConfig.provider === 'digitalocean') {
if (typeof dnsConfig.token !== 'string') return callback(new SettingsError(SettingsError.BAD_FIELD, 'token must be a string'));
credentials = {
provider: dnsConfig.provider,
token: dnsConfig.token