From 911d05bb24f7eb77d48432d37fef4a5526487904 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 22 Dec 2018 07:20:58 -0700 Subject: [PATCH] v2.6.5: don't allow IP addresses --- index.js | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 45add6e..1ea0328 100644 --- a/index.js +++ b/index.js @@ -393,6 +393,9 @@ Greenlock.create = function (gl) { if (!gl.approvedDomains.length) { throw new Error("le-sni-auto is not properly configured. Missing approveDomains(domain, certs, callback)"); } + if (!/[a-z]/i.test(lexOpts.domain)) { + throw new Error("le-sni-auto does not allow IP addresses by default"); + } if (!Array.isArray(gl.approvedDomains)) { // The acme-v2 package uses pre-flight test challenges to diff --git a/package.json b/package.json index a39f3be..c7c81c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock", - "version": "2.6.4", + "version": "2.6.5", "description": "Let's Encrypt for node.js on npm", "main": "index.js", "files": [