From 1af2fb29589c1a3f41b27bec21111c676bffeaa0 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 4 Feb 2019 22:30:55 -0700 Subject: [PATCH] v1.5.2: fix dns-01 wildcard bug --- node.js | 3 ++- package.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/node.js b/node.js index 80b614e..1bc21ee 100644 --- a/node.js +++ b/node.js @@ -46,7 +46,8 @@ ACME.challengeTests = { }); } , 'dns-01': function (me, auth) { - var hostname = ACME.challengePrefixes['dns-01'] + '.' + auth.hostname; + // remove leading *. on wildcard domains + var hostname = ACME.challengePrefixes['dns-01'] + '.' + auth.hostname.replace(/^\*\./, ''); return me._dig({ type: 'TXT' , name: hostname diff --git a/package.json b/package.json index 87132b2..6d3cfe2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acme-v2", - "version": "1.5.1", + "version": "1.5.2", "description": "Free SSL. A framework for building Let's Encrypt v2 clients, and other ACME v2 (draft 11) clients. Successor to le-acme-core.js", "homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js", "main": "node.js",