From 57eab66a4dfe532cb4d7a0cb3489f0de371c8060 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 16 Dec 2015 09:48:34 +0000 Subject: [PATCH] throw error if url is absent --- lib/get-acme-urls.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/get-acme-urls.js b/lib/get-acme-urls.js index becc9bc..daf4134 100644 --- a/lib/get-acme-urls.js +++ b/lib/get-acme-urls.js @@ -10,6 +10,9 @@ module.exports.create = function (deps) { var knownUrls = deps.LeCore.knownEndpoints; function getAcmeUrls(acmeDiscoveryUrl, cb) { + if ('string' !== typeof acmeDiscoveryUrl) { + cb(new Error("getAcmeUrls: acmeDiscoveryUrl must be a string")); + } // TODO check response header on request for cache time return request({