From 23573543a3af594a950c16046fdb9cc2467701f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Jan 2021 23:36:33 +0000 Subject: [PATCH 01/32] Bump ini from 1.3.5 to 1.3.8 in /frontend Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] --- frontend/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d6896cd20..2702ae95e 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3741,9 +3741,9 @@ inherits@2.0.3: integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== inquirer@^7.0.0: version "7.3.3" From fe13b12f4387035b952da68bf2115adb096a8531 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Mon, 8 Feb 2021 16:46:35 -0500 Subject: [PATCH 02/32] Removed the need to restart Nginx Proxy Manager after generating JWT key pair. --- backend/models/token.js | 17 ++++++++++++++--- backend/setup.js | 5 ++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/backend/models/token.js b/backend/models/token.js index 373f8e5c9..4e1b1826e 100644 --- a/backend/models/token.js +++ b/backend/models/token.js @@ -4,15 +4,23 @@ */ const _ = require('lodash'); -const config = require('config'); const jwt = require('jsonwebtoken'); const crypto = require('crypto'); const error = require('../lib/error'); const ALGO = 'RS256'; +let public_key = null; +let private_key = null; + +function checkJWTKeyPair() { + if (!public_key || !private_key) { + let config = require('config'); + public_key = config.get('jwt.pub'); + private_key = config.get('jwt.key'); + } +} + module.exports = function () { - const public_key = config.get('jwt.pub'); - const private_key = config.get('jwt.key'); let token_data = {}; @@ -32,6 +40,8 @@ module.exports = function () { .toString('base64') .substr(-8); + checkJWTKeyPair(); + return new Promise((resolve, reject) => { jwt.sign(payload, private_key, options, (err, token) => { if (err) { @@ -53,6 +63,7 @@ module.exports = function () { */ load: function (token) { return new Promise((resolve, reject) => { + checkJWTKeyPair(); try { if (!token || token === null || token === 'null') { reject(new error.AuthError('Empty token')); diff --git a/backend/setup.js b/backend/setup.js index d58a16066..9a59f9acd 100644 --- a/backend/setup.js +++ b/backend/setup.js @@ -51,9 +51,8 @@ const setupJwt = () => { reject(err); } else { logger.info('Wrote JWT key pair to config file: ' + filename); - - logger.warn('Restarting interface to apply new configuration'); - process.exit(0); + delete require.cache[require.resolve('config')]; + resolve(); } }); } else { From 6df7b72e08a0443b50e51e47e850724f73edbebf Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Tue, 9 Feb 2021 11:23:15 +0100 Subject: [PATCH 03/32] Forward scheme and http code added for redirection hosts You can now configure the forward_scheme and forward_http_code on user interface (section redirection hosts) --- .version | 2 +- .../schema/endpoints/redirection-hosts.json | 26 +++++++++++++++++++ backend/templates/redirection_host.conf | 4 +-- frontend/js/app/nginx/redirection/form.ejs | 25 +++++++++++++++++- .../js/app/nginx/redirection/list/item.ejs | 6 +++++ frontend/js/models/redirection-host.js | 2 ++ 6 files changed, 61 insertions(+), 4 deletions(-) diff --git a/.version b/.version index 834f26295..dbe590065 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.8.0 +2.8.1 diff --git a/backend/schema/endpoints/redirection-hosts.json b/backend/schema/endpoints/redirection-hosts.json index 1295fa4fd..14a469985 100644 --- a/backend/schema/endpoints/redirection-hosts.json +++ b/backend/schema/endpoints/redirection-hosts.json @@ -18,6 +18,12 @@ "domain_names": { "$ref": "../definitions.json#/definitions/domain_names" }, + "forward_http_code": { + "$ref": "../definitions.json#/definitions/http_code" + }, + "forward_scheme": { + "$ref": "../definitions.json#/definitions/scheme" + }, "forward_domain_name": { "$ref": "../definitions.json#/definitions/domain_name" }, @@ -67,6 +73,12 @@ "domain_names": { "$ref": "#/definitions/domain_names" }, + "forward_http_code": { + "$ref": "#/definitions/forward_http_code" + }, + "forward_scheme": { + "$ref": "#/definitions/forward_scheme" + }, "forward_domain_name": { "$ref": "#/definitions/forward_domain_name" }, @@ -134,12 +146,20 @@ "additionalProperties": false, "required": [ "domain_names", + "forward_scheme", + "forward_http_code", "forward_domain_name" ], "properties": { "domain_names": { "$ref": "#/definitions/domain_names" }, + "forward_http_code": { + "$ref": "#/definitions/forward_http_code" + }, + "forward_scheme": { + "$ref": "#/definitions/forward_scheme" + }, "forward_domain_name": { "$ref": "#/definitions/forward_domain_name" }, @@ -195,6 +215,12 @@ "domain_names": { "$ref": "#/definitions/domain_names" }, + "forward_http_code": { + "$ref": "#/definitions/forward_http_code" + }, + "forward_scheme": { + "$ref": "#/definitions/forward_scheme" + }, "forward_domain_name": { "$ref": "#/definitions/forward_domain_name" }, diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf index 463f3a8eb..55e7280f9 100644 --- a/backend/templates/redirection_host.conf +++ b/backend/templates/redirection_host.conf @@ -18,9 +18,9 @@ server { {% include "_hsts.conf" %} {% if preserve_path == 1 or preserve_path == true %} - return 301 $scheme://{{ forward_domain_name }}$request_uri; + return {{ forward_http_code }} {{ forward_scheme }}://{{ forward_domain_name }}$request_uri; {% else %} - return 301 $scheme://{{ forward_domain_name }}; + return {{ forward_http_code }} {{ forward_scheme }}://{{ forward_domain_name }}; {% endif %} } {% endif %} diff --git a/frontend/js/app/nginx/redirection/form.ejs b/frontend/js/app/nginx/redirection/form.ejs index 3247233a1..9e1628a51 100644 --- a/frontend/js/app/nginx/redirection/form.ejs +++ b/frontend/js/app/nginx/redirection/form.ejs @@ -22,12 +22,35 @@ -
+
+
+ + +
+
+
+
+
+ + +
+
+ +
<%- forward_http_code %>
+ + +
<%- forward_scheme %>
+
<%- forward_domain_name %>
diff --git a/frontend/js/models/redirection-host.js b/frontend/js/models/redirection-host.js index a4f11e21e..1d0b0de24 100644 --- a/frontend/js/models/redirection-host.js +++ b/frontend/js/models/redirection-host.js @@ -9,6 +9,8 @@ const model = Backbone.Model.extend({ created_on: null, modified_on: null, domain_names: [], + forward_http_code: 0, + forward_scheme: null, forward_domain_name: '', preserve_path: true, certificate_id: 0, From 8ba6c4f7e7faa9793d50f2534aff15e4efe104a4 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 09:55:41 +0100 Subject: [PATCH 04/32] Added http_code definition --- backend/schema/definitions.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/schema/definitions.json b/backend/schema/definitions.json index 2aa538b23..37c71f523 100644 --- a/backend/schema/definitions.json +++ b/backend/schema/definitions.json @@ -179,6 +179,12 @@ "pattern": "^(?:\\*\\.)?(?:[^.*]+\\.?)+[^.]$" } }, + "http_code": { + "description": "HTTP Status Code", + "example": 302, + "type": "integer", + "minimum": 0 + }, "enabled": { "description": "Is Enabled", "example": true, From e35138ebedd28f34ae72a18cbbe255ef57427a1d Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 10:42:34 +0100 Subject: [PATCH 05/32] Added scheme to definitions --- backend/schema/definitions.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/schema/definitions.json b/backend/schema/definitions.json index 37c71f523..f0acf3104 100644 --- a/backend/schema/definitions.json +++ b/backend/schema/definitions.json @@ -185,6 +185,12 @@ "type": "integer", "minimum": 0 }, + "scheme": { + "description": "RFC Protocol", + "example": "HTTPS or $scheme", + "type": "string", + "minLength": 4 + }, "enabled": { "description": "Is Enabled", "example": true, From ebeda6345ec9c36c148d4b1676dc5b74d70a9352 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 14:11:01 +0100 Subject: [PATCH 06/32] Globalization done Ready to merge --- frontend/js/app/nginx/redirection/form.ejs | 4 ++-- frontend/js/i18n/messages.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/js/app/nginx/redirection/form.ejs b/frontend/js/app/nginx/redirection/form.ejs index 9e1628a51..488d27339 100644 --- a/frontend/js/app/nginx/redirection/form.ejs +++ b/frontend/js/app/nginx/redirection/form.ejs @@ -24,7 +24,7 @@
- + diff --git a/frontend/js/i18n/messages.json b/frontend/js/i18n/messages.json index 202e94ac7..3437b1098 100644 --- a/frontend/js/i18n/messages.json +++ b/frontend/js/i18n/messages.json @@ -137,6 +137,8 @@ "empty": "There are no Redirection Hosts", "add": "Add Redirection Host", "form-title": "{id, select, undefined{New} other{Edit}} Redirection Host", + "forward-scheme": "Scheme", + "forward-http-status-code": "HTTP Code", "forward-domain": "Forward Domain", "preserve-path": "Preserve Path", "delete": "Delete Proxy Host", From 77a2ee948aa502069fe37dc623c24e18f8b9c70b Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 15:25:19 +0100 Subject: [PATCH 07/32] Updated list table Added state code columns Better form columns sizing --- frontend/js/app/nginx/redirection/form.ejs | 4 ++-- frontend/js/app/nginx/redirection/list/main.ejs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/js/app/nginx/redirection/form.ejs b/frontend/js/app/nginx/redirection/form.ejs index 488d27339..7e1907193 100644 --- a/frontend/js/app/nginx/redirection/form.ejs +++ b/frontend/js/app/nginx/redirection/form.ejs @@ -22,7 +22,7 @@
-
+
-
+
diff --git a/frontend/js/app/nginx/redirection/list/main.ejs b/frontend/js/app/nginx/redirection/list/main.ejs index 15af827a0..41158a7e8 100644 --- a/frontend/js/app/nginx/redirection/list/main.ejs +++ b/frontend/js/app/nginx/redirection/list/main.ejs @@ -1,6 +1,7 @@   <%- i18n('str', 'source') %> + <%- i18n('redirection-hosts', 'forward-http-status-code') %> <%- i18n('str', 'destination') %> <%- i18n('str', 'ssl') %> <%- i18n('str', 'status') %> From 329d0ecaed9328e96ffdd296f5b57e311764816a Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 15:27:11 +0100 Subject: [PATCH 08/32] Added forward scheme to table columns --- frontend/js/app/nginx/redirection/list/main.ejs | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/js/app/nginx/redirection/list/main.ejs b/frontend/js/app/nginx/redirection/list/main.ejs index 41158a7e8..8b6930d60 100644 --- a/frontend/js/app/nginx/redirection/list/main.ejs +++ b/frontend/js/app/nginx/redirection/list/main.ejs @@ -2,6 +2,7 @@   <%- i18n('str', 'source') %> <%- i18n('redirection-hosts', 'forward-http-status-code') %> + <%- i18n('redirection-hosts', 'forward-scheme') %> <%- i18n('str', 'destination') %> <%- i18n('str', 'ssl') %> <%- i18n('str', 'status') %> From 1f122e9145ab24ec15c7da7baf82e9f96b13bc54 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 15:57:28 +0100 Subject: [PATCH 09/32] Database migrations created --- .../20210210154702_redirection_scheme.js | 49 +++++++++++++++++++ .../20210210154703_redirection_status_code.js | 49 +++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 backend/migrations/20210210154702_redirection_scheme.js create mode 100644 backend/migrations/20210210154703_redirection_status_code.js diff --git a/backend/migrations/20210210154702_redirection_scheme.js b/backend/migrations/20210210154702_redirection_scheme.js new file mode 100644 index 000000000..a7fcca978 --- /dev/null +++ b/backend/migrations/20210210154702_redirection_scheme.js @@ -0,0 +1,49 @@ +const migrate_name = 'redirection_scheme'; +const logger = require('../logger').migrate; + +/** + * Migrate + * + * @see http://knexjs.org/#Schema + * + * @param {Object} knex + * @param {Promise} Promise + * @returns {Promise} + */ +exports.up = function (knex, Promise) { + + logger.info('[' + migrate_name + '] Migrating Up...'); + + return knex.schema.table('redirection_host', (table) => { + table.string('forward_scheme').notNull().defaultTo("$scheme"); + }) + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); + + logger.info('[' + migrate_name + '] Migrating Up Complete'); + + return Promise.resolve(true); +}; + +/** + * Undo Migrate + * + * @param {Object} knex + * @param {Promise} Promise + * @returns {Promise} + */ +exports.down = function (knex, Promise) { + logger.info('[' + migrate_name + '] Migrating Down...'); + + return knex.schema.table('redirection_host', (table) => { + table.dropColumn('forward_scheme'); + }) + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); + + logger.info('[' + migrate_name + '] Migrating Down Complete'); + + return Promise.resolve(true); +}; diff --git a/backend/migrations/20210210154703_redirection_status_code.js b/backend/migrations/20210210154703_redirection_status_code.js new file mode 100644 index 000000000..c5888dd57 --- /dev/null +++ b/backend/migrations/20210210154703_redirection_status_code.js @@ -0,0 +1,49 @@ +const migrate_name = 'redirection_status_code'; +const logger = require('../logger').migrate; + +/** + * Migrate + * + * @see http://knexjs.org/#Schema + * + * @param {Object} knex + * @param {Promise} Promise + * @returns {Promise} + */ +exports.up = function (knex, Promise) { + + logger.info('[' + migrate_name + '] Migrating Up...'); + + return knex.schema.table('redirection_host', (table) => { + table.integer('forward_http_code').notNull().unsigned().defaultTo(302); + }) + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); + + logger.info('[' + migrate_name + '] Migrating Up Complete'); + + return Promise.resolve(true); +}; + +/** + * Undo Migrate + * + * @param {Object} knex + * @param {Promise} Promise + * @returns {Promise} + */ +exports.down = function (knex, Promise) { + logger.info('[' + migrate_name + '] Migrating Down...'); + + return knex.schema.table('redirection_host', (table) => { + table.dropColumn('forward_http_code'); + }) + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); + + logger.info('[' + migrate_name + '] Migrating Down Complete'); + + return Promise.resolve(true); +}; From eb20add0c76f9b6ff6d4f550a58d64ccb708f878 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 17:16:33 +0100 Subject: [PATCH 10/32] Migrations hotfix --- .../20210210154702_redirection_scheme.js | 26 +++++++------------ .../20210210154703_redirection_status_code.js | 26 +++++++------------ 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/backend/migrations/20210210154702_redirection_scheme.js b/backend/migrations/20210210154702_redirection_scheme.js index a7fcca978..886fa05f2 100644 --- a/backend/migrations/20210210154702_redirection_scheme.js +++ b/backend/migrations/20210210154702_redirection_scheme.js @@ -1,5 +1,5 @@ const migrate_name = 'redirection_scheme'; -const logger = require('../logger').migrate; +const logger = require('../logger').migrate; /** * Migrate @@ -15,15 +15,11 @@ exports.up = function (knex, Promise) { logger.info('[' + migrate_name + '] Migrating Up...'); return knex.schema.table('redirection_host', (table) => { - table.string('forward_scheme').notNull().defaultTo("$scheme"); - }) - .then(function () { + table.string('forward_scheme').notNull().defaultTo('$scheme'); + }) + .then(function () { logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); - - logger.info('[' + migrate_name + '] Migrating Up Complete'); - - return Promise.resolve(true); + }); }; /** @@ -37,13 +33,9 @@ exports.down = function (knex, Promise) { logger.info('[' + migrate_name + '] Migrating Down...'); return knex.schema.table('redirection_host', (table) => { - table.dropColumn('forward_scheme'); - }) - .then(function () { + table.dropColumn('forward_scheme'); + }) + .then(function () { logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); - - logger.info('[' + migrate_name + '] Migrating Down Complete'); - - return Promise.resolve(true); + }); }; diff --git a/backend/migrations/20210210154703_redirection_status_code.js b/backend/migrations/20210210154703_redirection_status_code.js index c5888dd57..594892fdb 100644 --- a/backend/migrations/20210210154703_redirection_status_code.js +++ b/backend/migrations/20210210154703_redirection_status_code.js @@ -1,5 +1,5 @@ const migrate_name = 'redirection_status_code'; -const logger = require('../logger').migrate; +const logger = require('../logger').migrate; /** * Migrate @@ -15,15 +15,11 @@ exports.up = function (knex, Promise) { logger.info('[' + migrate_name + '] Migrating Up...'); return knex.schema.table('redirection_host', (table) => { - table.integer('forward_http_code').notNull().unsigned().defaultTo(302); - }) - .then(function () { + table.integer('forward_http_code').notNull().unsigned().defaultTo(302); + }) + .then(function () { logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); - - logger.info('[' + migrate_name + '] Migrating Up Complete'); - - return Promise.resolve(true); + }); }; /** @@ -37,13 +33,9 @@ exports.down = function (knex, Promise) { logger.info('[' + migrate_name + '] Migrating Down...'); return knex.schema.table('redirection_host', (table) => { - table.dropColumn('forward_http_code'); - }) - .then(function () { + table.dropColumn('forward_http_code'); + }) + .then(function () { logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); - - logger.info('[' + migrate_name + '] Migrating Down Complete'); - - return Promise.resolve(true); + }); }; From 9b83d35ef4a36a25372c240ace0e9213c7a7edb3 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 18:12:02 +0100 Subject: [PATCH 11/32] Migrations --- .../20210210154702_redirection_scheme.js | 18 +++++++++--------- .../20210210154703_redirection_status_code.js | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/backend/migrations/20210210154702_redirection_scheme.js b/backend/migrations/20210210154702_redirection_scheme.js index 886fa05f2..c153ba3b0 100644 --- a/backend/migrations/20210210154702_redirection_scheme.js +++ b/backend/migrations/20210210154702_redirection_scheme.js @@ -1,5 +1,5 @@ const migrate_name = 'redirection_scheme'; -const logger = require('../logger').migrate; +const logger = require('../logger').migrate; /** * Migrate @@ -10,16 +10,16 @@ const logger = require('../logger').migrate; * @param {Promise} Promise * @returns {Promise} */ -exports.up = function (knex, Promise) { +exports.up = function (knex/*, Promise*/) { logger.info('[' + migrate_name + '] Migrating Up...'); return knex.schema.table('redirection_host', (table) => { table.string('forward_scheme').notNull().defaultTo('$scheme'); }) - .then(function () { - logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); }; /** @@ -29,13 +29,13 @@ exports.up = function (knex, Promise) { * @param {Promise} Promise * @returns {Promise} */ -exports.down = function (knex, Promise) { +exports.down = function (knex/*, Promise*/) { logger.info('[' + migrate_name + '] Migrating Down...'); return knex.schema.table('redirection_host', (table) => { table.dropColumn('forward_scheme'); }) - .then(function () { - logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); }; diff --git a/backend/migrations/20210210154703_redirection_status_code.js b/backend/migrations/20210210154703_redirection_status_code.js index 594892fdb..e623733df 100644 --- a/backend/migrations/20210210154703_redirection_status_code.js +++ b/backend/migrations/20210210154703_redirection_status_code.js @@ -10,7 +10,7 @@ const logger = require('../logger').migrate; * @param {Promise} Promise * @returns {Promise} */ -exports.up = function (knex, Promise) { +exports.up = function (knex/*, Promise*/) { logger.info('[' + migrate_name + '] Migrating Up...'); @@ -29,7 +29,7 @@ exports.up = function (knex, Promise) { * @param {Promise} Promise * @returns {Promise} */ -exports.down = function (knex, Promise) { +exports.down = function (knex/*, Promise*/) { logger.info('[' + migrate_name + '] Migrating Down...'); return knex.schema.table('redirection_host', (table) => { From 49b0f11ae7d92e4a25908412459ccf43e5d12fbe Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 18:13:12 +0100 Subject: [PATCH 12/32] migrations --- .../20210210154702_redirection_scheme.js | 8 ++++---- .../20210210154703_redirection_status_code.js | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/backend/migrations/20210210154702_redirection_scheme.js b/backend/migrations/20210210154702_redirection_scheme.js index c153ba3b0..a7ec19ab4 100644 --- a/backend/migrations/20210210154702_redirection_scheme.js +++ b/backend/migrations/20210210154702_redirection_scheme.js @@ -6,8 +6,8 @@ const logger = require('../logger').migrate; * * @see http://knexjs.org/#Schema * - * @param {Object} knex - * @param {Promise} Promise + * @param {Object} knex + * @param {Promise} Promise * @returns {Promise} */ exports.up = function (knex/*, Promise*/) { @@ -25,8 +25,8 @@ exports.up = function (knex/*, Promise*/) { /** * Undo Migrate * - * @param {Object} knex - * @param {Promise} Promise + * @param {Object} knex + * @param {Promise} Promise * @returns {Promise} */ exports.down = function (knex/*, Promise*/) { diff --git a/backend/migrations/20210210154703_redirection_status_code.js b/backend/migrations/20210210154703_redirection_status_code.js index e623733df..789d4baa4 100644 --- a/backend/migrations/20210210154703_redirection_status_code.js +++ b/backend/migrations/20210210154703_redirection_status_code.js @@ -6,8 +6,8 @@ const logger = require('../logger').migrate; * * @see http://knexjs.org/#Schema * - * @param {Object} knex - * @param {Promise} Promise + * @param {Object} knex + * @param {Promise} Promise * @returns {Promise} */ exports.up = function (knex/*, Promise*/) { @@ -17,16 +17,16 @@ exports.up = function (knex/*, Promise*/) { return knex.schema.table('redirection_host', (table) => { table.integer('forward_http_code').notNull().unsigned().defaultTo(302); }) - .then(function () { - logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); }; /** * Undo Migrate * - * @param {Object} knex - * @param {Promise} Promise + * @param {Object} knex + * @param {Promise} Promise * @returns {Promise} */ exports.down = function (knex/*, Promise*/) { @@ -35,7 +35,7 @@ exports.down = function (knex/*, Promise*/) { return knex.schema.table('redirection_host', (table) => { table.dropColumn('forward_http_code'); }) - .then(function () { - logger.info('[' + migrate_name + '] redirection_host Table altered'); - }); + .then(function () { + logger.info('[' + migrate_name + '] redirection_host Table altered'); + }); }; From 4060718e5c33311e417ead41d561e2731cb3a4fd Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 18:26:19 +0100 Subject: [PATCH 13/32] Hotfix: This group of assignments is not aligned --- backend/migrations/20210210154702_redirection_scheme.js | 2 +- backend/migrations/20210210154703_redirection_status_code.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/migrations/20210210154702_redirection_scheme.js b/backend/migrations/20210210154702_redirection_scheme.js index a7ec19ab4..0dad48768 100644 --- a/backend/migrations/20210210154702_redirection_scheme.js +++ b/backend/migrations/20210210154702_redirection_scheme.js @@ -1,5 +1,5 @@ const migrate_name = 'redirection_scheme'; -const logger = require('../logger').migrate; +const logger = require('../logger').migrate; /** * Migrate diff --git a/backend/migrations/20210210154703_redirection_status_code.js b/backend/migrations/20210210154703_redirection_status_code.js index 789d4baa4..b9bea0b92 100644 --- a/backend/migrations/20210210154703_redirection_status_code.js +++ b/backend/migrations/20210210154703_redirection_status_code.js @@ -1,5 +1,5 @@ const migrate_name = 'redirection_status_code'; -const logger = require('../logger').migrate; +const logger = require('../logger').migrate; /** * Migrate From 49fbf031d1d2f3bfa6a7d828164feac5955d2b11 Mon Sep 17 00:00:00 2001 From: baruffaldi Date: Wed, 10 Feb 2021 19:43:29 +0100 Subject: [PATCH 14/32] $scheme is displayed as "auto" on hosts listing --- frontend/js/app/nginx/redirection/list/item.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/js/app/nginx/redirection/list/item.ejs b/frontend/js/app/nginx/redirection/list/item.ejs index f6ba688d6..dfff29d75 100644 --- a/frontend/js/app/nginx/redirection/list/item.ejs +++ b/frontend/js/app/nginx/redirection/list/item.ejs @@ -26,7 +26,7 @@
<%- forward_http_code %>
-
<%- forward_scheme %>
+
<%- forward_scheme == '$scheme' ? 'auto' : forward_scheme %>
<%- forward_domain_name %>
From 7e7032c051d5a6d78c985118899adff28000b2ca Mon Sep 17 00:00:00 2001 From: Orko Garai Date: Thu, 18 Feb 2021 05:40:49 +0000 Subject: [PATCH 15/32] Prevent activating nginx config after editing disabled proxy host --- backend/internal/proxy-host.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/proxy-host.js b/backend/internal/proxy-host.js index b26e05666..09b8bca51 100644 --- a/backend/internal/proxy-host.js +++ b/backend/internal/proxy-host.js @@ -189,6 +189,10 @@ const internalProxyHost = { expand: ['owner', 'certificate', 'access_list.[clients,items]'] }) .then((row) => { + if (!row.enabled) { + // No need to add nginx config if host is disabled + return row; + } // Configure nginx return internalNginx.configure(proxyHostModel, 'proxy_host', row) .then((new_meta) => { From 7f243e6f062e3039c2e06880d23edccb6e0e85ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Mar 2021 21:06:50 +0000 Subject: [PATCH 16/32] Bump prismjs from 1.21.0 to 1.23.0 in /docs Bumps [prismjs](https://github.com/PrismJS/prism) from 1.21.0 to 1.23.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.21.0...v1.23.0) Signed-off-by: dependabot[bot] --- docs/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index 0911a239a..1fe132ac4 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -7679,9 +7679,9 @@ pretty-time@^1.1.0: integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== prismjs@^1.13.0, prismjs@^1.20.0: - version "1.21.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.21.0.tgz#36c086ec36b45319ec4218ee164c110f9fc015a3" - integrity sha512-uGdSIu1nk3kej2iZsLyDoJ7e9bnPzIgY0naW/HdknGj61zScaprVEVGHrPoXqI+M9sP0NDnTK2jpkvmldpuqDw== + version "1.23.0" + resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.23.0.tgz#d3b3967f7d72440690497652a9d40ff046067f33" + integrity sha512-c29LVsqOaLbBHuIbsTxaKENh1N2EQBOHaWv7gkHN4dgRbxSREqDnDbtFJYdpPauS4YCplMSNCABQ6Eeor69bAA== optionalDependencies: clipboard "^2.0.0" From cfcb657cdeeefa8519a3ae7c0a79cbceefb594f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 08:19:41 +0000 Subject: [PATCH 17/32] Bump elliptic from 6.5.3 to 6.5.4 in /frontend Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- frontend/yarn.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/frontend/yarn.lock b/frontend/yarn.lock index d6896cd20..1ce091a9c 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1551,10 +1551,10 @@ bluebird@^3.5.5: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.1: version "5.1.2" @@ -1616,7 +1616,7 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.0.1: +brorand@^1.0.1, brorand@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= @@ -2630,17 +2630,17 @@ electron-to-chromium@^1.3.47: integrity sha512-67V62Z4CFOiAtox+o+tosGfVk0QX4DJgH609tjT8QymbJZVAI/jWnAthnr8c5hnRNziIRwkc9EMQYejiVz3/9Q== elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emoji-regex@^7.0.1: version "7.0.3" @@ -3516,7 +3516,7 @@ he@1.2.x, he@^1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -hmac-drbg@^1.0.0: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -4549,7 +4549,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= From 1e5d9dfbffccde643a55752db7e398478edd5806 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Mar 2021 10:39:22 +0000 Subject: [PATCH 18/32] Bump elliptic from 6.5.3 to 6.5.4 in /docs Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4) Signed-off-by: dependabot[bot] --- docs/yarn.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index 0911a239a..91c294e95 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2000,10 +2000,10 @@ bluebird@^3.1.1, bluebird@^3.5.5, bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== bn.js@^5.1.1, bn.js@^5.1.2: version "5.1.2" @@ -3675,17 +3675,17 @@ electron-to-chromium@^1.3.488, electron-to-chromium@^1.3.522: integrity sha512-67V62Z4CFOiAtox+o+tosGfVk0QX4DJgH609tjT8QymbJZVAI/jWnAthnr8c5hnRNziIRwkc9EMQYejiVz3/9Q== elliptic@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" + bn.js "^4.11.9" + brorand "^1.1.0" hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" emoji-regex@^7.0.1: version "7.0.3" @@ -4727,7 +4727,7 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== -hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: +hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= @@ -6354,7 +6354,7 @@ minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: +minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= From afbec0aca96fd860bbaaed0bebf9e5294e6ea325 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 11 Mar 2021 08:41:10 +1000 Subject: [PATCH 19/32] Fix CI, use docker for a yarn command --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 74dc0a1e0..e92574dd7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -144,8 +144,12 @@ pipeline { } steps { dir(path: 'docs') { - sh 'yarn install' - sh 'yarn build' + sh '''docker run --rm \\ + -v "$(pwd):/app" \\ + -w /app \\ + node:latest \\ + sh -c "yarn install && yarn build" + ''' } dir(path: 'docs/.vuepress/dist') { From bb5fc58f3af7d82fbca19a513e405fd635dadd07 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 11 Mar 2021 09:29:08 +1000 Subject: [PATCH 20/32] Revert "Fix CI, use docker for a yarn command" This reverts commit afbec0aca96fd860bbaaed0bebf9e5294e6ea325. --- Jenkinsfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e92574dd7..74dc0a1e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -144,12 +144,8 @@ pipeline { } steps { dir(path: 'docs') { - sh '''docker run --rm \\ - -v "$(pwd):/app" \\ - -w /app \\ - node:latest \\ - sh -c "yarn install && yarn build" - ''' + sh 'yarn install' + sh 'yarn build' } dir(path: 'docs/.vuepress/dist') { From 607fb83a1e5485dd1512b18cde33ffdea6103a80 Mon Sep 17 00:00:00 2001 From: Niels Bouma Date: Thu, 11 Mar 2021 13:33:42 +0100 Subject: [PATCH 21/32] Added transIP certbot dns plugin --- global/certbot-dns-plugins.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index b055f848a..c0330c101 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -302,4 +302,14 @@ dns_eurodns_apiKey = mysecretpassword dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`, full_plugin_name: 'certbot-dns-eurodns:dns-eurodns', }, + //####################################################// + transip: { + display_name: 'TransIP', + package_name: 'certbot-dns-transip', + package_version: '0.3.3', + dependencies: '', + credentials: `dns_transip_username = my_username +dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, + full_plugin_name: 'certbot-dns-transip:dns-transip', + }, }; From bd0324dba00879f30fe53f3ef3d4b665c6ed93e0 Mon Sep 17 00:00:00 2001 From: Niels Bouma Date: Thu, 11 Mar 2021 15:44:20 +0100 Subject: [PATCH 22/32] credentials property naming for transip credentials property naming for transip --- global/certbot-dns-plugins.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index c0330c101..f64c66e56 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -308,8 +308,8 @@ dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`, package_name: 'certbot-dns-transip', package_version: '0.3.3', dependencies: '', - credentials: `dns_transip_username = my_username -dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, + credentials: `certbot_dns_transip:dns_transip_username = my_username +certbot_dns_transip:dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, full_plugin_name: 'certbot-dns-transip:dns-transip', }, }; From 967e0dd98abca6002d8e08b58737ee7378a0e329 Mon Sep 17 00:00:00 2001 From: David Dosoudil <69464125+phantomski77@users.noreply.github.com> Date: Thu, 11 Mar 2021 21:59:26 +0000 Subject: [PATCH 23/32] Update README.md Secrets need both global and local per-service declaration, otherwise fails as "not found". Local configuration added for both app and db. --- docs/advanced-config/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/advanced-config/README.md b/docs/advanced-config/README.md index ebd9734be..2c6cb7ce9 100644 --- a/docs/advanced-config/README.md +++ b/docs/advanced-config/README.md @@ -92,6 +92,8 @@ services: volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt + secrets: + - MYSQL_PWD depends_on: - db db: @@ -106,6 +108,9 @@ services: MYSQL_PASSWORD__FILE: /run/secrets/MYSQL_PWD volumes: - ./data/mysql:/var/lib/mysql + secrets: + - DB_ROOT_PWD + - MYSQL_PWD ``` From ead19915f3dc04c77cb64d44d2ddc0d9b823e1a3 Mon Sep 17 00:00:00 2001 From: ijaron Date: Fri, 12 Mar 2021 14:24:56 -0600 Subject: [PATCH 24/32] Add ACME-DNS certbot plugin uses https://github.com/pan-net-security/certbot-dns-acmedns in to implement ACME-DNS support. Requires file in /data with following layout # cat /data/acme-registration.json { "something.acme.com": { "username": "6e14735c-2c6a-447e-b63d-a23ac4438bd7", "password": "dd6gnYS-IxrQfDLbdPRX3hrFhS_SLrwbS0kSl_i8", "fulldomain": "3b750a0e-c627-423f-9966-4799c6a9533b.auth.example.org", "subdomain": "3b750a0e-c627-423f-9966-4799c6a9533b", "allowfrom": [] } } --- global/certbot-dns-plugins.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index b055f848a..bd8f778b2 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -302,4 +302,14 @@ dns_eurodns_apiKey = mysecretpassword dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`, full_plugin_name: 'certbot-dns-eurodns:dns-eurodns', }, + //####################################################// + acmedns: { + display_name: 'ACME-DNS', + package_name: 'certbot-dns-acmedns', + package_version: '0.1.0', + dependencies: '', + credentials: `certbot_dns_acmedns:dns_acmedns_api_url = http://acmedns-server/ +certbot_dns_acmedns:dns_acmedns_registration_file = /data/acme-registration.json`, + full_plugin_name: 'certbot-dns-acmedns:dns-acmedns', + }, }; From 1c6425201515851e1bdbdff477a9740da3d89136 Mon Sep 17 00:00:00 2001 From: David Dosoudil <69464125+phantomski77@users.noreply.github.com> Date: Sat, 13 Mar 2021 12:40:47 +0000 Subject: [PATCH 25/32] Update _hsts.conf template I propose the change to max-age value of HSTS from 1 year to 2 years. --- backend/templates/_hsts.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/templates/_hsts.conf b/backend/templates/_hsts.conf index cd8ec18ab..11aecf24c 100644 --- a/backend/templates/_hsts.conf +++ b/backend/templates/_hsts.conf @@ -1,8 +1,8 @@ {% if certificate and certificate_id > 0 -%} {% if ssl_forced == 1 or ssl_forced == true %} {% if hsts_enabled == 1 or hsts_enabled == true %} - # HSTS (ngx_http_headers_module is required) (31536000 seconds = 1 year) - add_header Strict-Transport-Security "max-age=31536000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always; + # HSTS (ngx_http_headers_module is required) (63072000 seconds = 2 years) + add_header Strict-Transport-Security "max-age=63072000;{% if hsts_subdomains == 1 or hsts_subdomains == true -%} includeSubDomains;{% endif %} preload" always; +{% endif %} {% endif %} {% endif %} -{% endif %} \ No newline at end of file From f29ff15167baf04ee0ef449031e73af7da641e5b Mon Sep 17 00:00:00 2001 From: Gurjinder Singh Date: Sun, 14 Mar 2021 05:13:26 -0400 Subject: [PATCH 26/32] Update README.md found it in config file was going to add option # Custom include /data/nginx/custom/http_top[.]conf; https://github.com/jc21/nginx-proxy-manager/blob/b7b808d98d787b25548265055d9f8621d31b580e/docker/rootfs/etc/nginx/nginx.conf#L72 --- docs/advanced-config/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/advanced-config/README.md b/docs/advanced-config/README.md index ebd9734be..49df73e89 100644 --- a/docs/advanced-config/README.md +++ b/docs/advanced-config/README.md @@ -132,6 +132,7 @@ NPM has the ability to include different custom configuration snippets in differ You can add your custom configuration snippet files at `/data/nginx/custom` as follow: - `/data/nginx/custom/root.conf`: Included at the very end of nginx.conf + - `/data/nginx/custom/http_top.conf`: Included at the top of the main http block - `/data/nginx/custom/http.conf`: Included at the end of the main http block - `/data/nginx/custom/stream.conf`: Included at the end of the main stream block - `/data/nginx/custom/server_proxy.conf`: Included at the end of every proxy server block From e2e31094aab872cfcbac977a2f5d8ef4ada7fee3 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Tue, 16 Mar 2021 11:32:38 +1000 Subject: [PATCH 27/32] Fix CI, no var needed for this --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 74dc0a1e0..39606e33b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -222,7 +222,7 @@ pipeline { always { sh 'docker-compose down --rmi all --remove-orphans --volumes -t 30' sh 'echo Reverting ownership' - sh 'docker run --rm -v $(pwd):/data ${DOCKER_CI_TOOLS} chown -R $(id -u):$(id -g) /data' + sh 'docker run --rm -v $(pwd):/data jc21/ci-tools chown -R $(id -u):$(id -g) /data' } success { juxtapose event: 'success' From 9469b9c78a6102e73be03d75038e0861df2d313a Mon Sep 17 00:00:00 2001 From: Niels Bouma Date: Tue, 16 Mar 2021 12:57:26 +0100 Subject: [PATCH 28/32] fixed closing brace --- global/certbot-dns-plugins.js | 1 + 1 file changed, 1 insertion(+) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index b18707187..2297b93f0 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -311,6 +311,7 @@ dns_eurodns_endpoint = https://rest-api.eurodns.com/user-api-gateway/proxy`, credentials: `certbot_dns_transip:dns_transip_username = my_username certbot_dns_transip:dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, full_plugin_name: 'certbot-dns-transip:dns-transip', + }, //####################################################// acmedns: { display_name: 'ACME-DNS', From d0a0c77556ad96901a22fbf64a6da69cf6cdd7a2 Mon Sep 17 00:00:00 2001 From: Niels Bouma Date: Tue, 16 Mar 2021 13:36:17 +0100 Subject: [PATCH 29/32] acmedns indentation fix --- global/certbot-dns-plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js index 2297b93f0..d71191c1f 100644 --- a/global/certbot-dns-plugins.js +++ b/global/certbot-dns-plugins.js @@ -313,7 +313,7 @@ certbot_dns_transip:dns_transip_key_file = /etc/letsencrypt/transip-rsa.key`, full_plugin_name: 'certbot-dns-transip:dns-transip', }, //####################################################// - acmedns: { + acmedns: { display_name: 'ACME-DNS', package_name: 'certbot-dns-acmedns', package_version: '0.1.0', From b127f024685daaecc6d0f2ffbf1fd5289103c4c2 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 17 Mar 2021 08:56:57 +1000 Subject: [PATCH 30/32] Added upgrade steps --- docs/.vuepress/config.js | 1 + docs/README.md | 12 ++++++++++++ docs/upgrading/README.md | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 docs/upgrading/README.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index d98ccdbf2..f3b735b8a 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -47,6 +47,7 @@ module.exports = { ["/screenshots/", "Screenshots"], ["/setup/", "Setup Instructions"], ["/advanced-config/", "Advanced Configuration"], + ["/upgrading/", "Upgrading"], ["/faq/", "Frequently Asked Questions"], ["/third-party/", "Third Party"] ] diff --git a/docs/README.md b/docs/README.md index 11c17e39c..d19655c5c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -97,3 +97,15 @@ Password: changeme ``` Immediately after logging in with this default user you will be asked to modify your details and change your password. + +5. Upgrading to new versions + +```bash +docker-compose pull +docker-compose up -d +``` + +This project will automatically update any databases or other requirements so you don't have to follow +any crazy instructions. These steps above will pull the latest updates and recreate the docker +containers. + diff --git a/docs/upgrading/README.md b/docs/upgrading/README.md new file mode 100644 index 000000000..0e78e8594 --- /dev/null +++ b/docs/upgrading/README.md @@ -0,0 +1,11 @@ +# Upgrading + +```bash +docker-compose pull +docker-compose up -d +``` + +This project will automatically update any databases or other requirements so you don't have to follow +any crazy instructions. These steps above will pull the latest updates and recreate the docker +containers. + From 3b104710d57d14a23f1cf7f3a334a9be5a8e2039 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 17 Mar 2021 14:53:57 +1000 Subject: [PATCH 31/32] Restrict redirect http code --- backend/schema/definitions.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/schema/definitions.json b/backend/schema/definitions.json index f0acf3104..9895b87ee 100644 --- a/backend/schema/definitions.json +++ b/backend/schema/definitions.json @@ -180,10 +180,11 @@ } }, "http_code": { - "description": "HTTP Status Code", + "description": "Redirect HTTP Status Code", "example": 302, "type": "integer", - "minimum": 0 + "minimum": 300, + "maximum": 308 }, "scheme": { "description": "RFC Protocol", From ba5f0c212cba2a8d23f88d9f407f1df1f78b73ec Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Wed, 17 Mar 2021 14:56:22 +1000 Subject: [PATCH 32/32] Bumped version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28d4740c3..6e7140713 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@



- +