v3.0.1: fix doctoring

This commit is contained in:
AJ ONeal 2019-10-31 06:31:34 -06:00
parent cdd1201bc6
commit c1ea352fa1
2 changed files with 12 additions and 4 deletions

View File

@ -51,6 +51,8 @@ Manage.create = function(CONF) {
// act as a setter // act as a setter
Object.keys(conf).forEach(function(k) { Object.keys(conf).forEach(function(k) {
// challenges are either both overwritten, or not set
// this is as it should be
config.defaults[k] = conf[k]; config.defaults[k] = conf[k];
}); });
@ -122,6 +124,7 @@ Manage.create = function(CONF) {
//args.expiresBefore = Date.now() + 45 * 24 * 60 * 60 * 1000; //args.expiresBefore = Date.now() + 45 * 24 * 60 * 60 * 1000;
var issuedBefore = args.issuedBefore || Infinity; var issuedBefore = args.issuedBefore || Infinity;
var expiresBefore = args.expiresBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000; var expiresBefore = args.expiresBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000;
var renewBefore = args.renewBefore || Infinity; //Date.now() + 21 * 24 * 60 * 60 * 1000;
// if there's anything to match, only return matches // if there's anything to match, only return matches
// if there's nothing to match, return everything // if there's nothing to match, return everything
@ -144,6 +147,9 @@ Manage.create = function(CONF) {
if (site.issuedAt >= issuedBefore) { if (site.issuedAt >= issuedBefore) {
return false; return false;
} }
if (site.renewAt >= renewBefore) {
return false;
}
// after attribute filtering, before cert filtering // after attribute filtering, before cert filtering
if (matchAll) { if (matchAll) {
@ -308,8 +314,8 @@ doctor.sites = function(config) {
if (!sites) { if (!sites) {
sites = {}; sites = {};
} }
if (Array.isArray(sites)) { if (Array.isArray(config.sites)) {
sites.forEach(function(site) { config.sites.forEach(function(site) {
sites[site.subject] = site; sites[site.subject] = site;
}); });
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "greenlock-manager-fs", "name": "greenlock-manager-fs",
"version": "3.0.0", "version": "3.0.1",
"description": "A simple file-based management strategy for Greenlock", "description": "A simple file-based management strategy for Greenlock",
"main": "manager.js", "main": "manager.js",
"scripts": { "scripts": {
@ -24,7 +24,9 @@
"license": "MPL-2.0", "license": "MPL-2.0",
"dependencies": { "dependencies": {
"@root/mkdirp": "^1.0.0", "@root/mkdirp": "^1.0.0",
"safe-replace": "^1.1.0", "safe-replace": "^1.1.0"
},
"devDependencies": {
"greenlock-manager-test": "^3.0.0" "greenlock-manager-test": "^3.0.0"
} }
} }