Skip to content

Commit bfb3282

Browse files
authored
Merge pull request #806 from jc21/develop
v2.7.2
2 parents 72ac549 + 64cc4f5 commit bfb3282

File tree

17 files changed

+100
-35
lines changed

17 files changed

+100
-35
lines changed

.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.1
1+
2.7.2

README.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img src="https://nginxproxymanager.com/github.png">
33
<br><br>
4-
<img src="https://img.shields.io/badge/version-2.7.1-green.svg?style=for-the-badge">
4+
<img src="https://img.shields.io/badge/version-2.7.2-green.svg?style=for-the-badge">
55
<a href="https://hub.docker.com/repository/docker/jc21/nginx-proxy-manager">
66
<img src="https://img.shields.io/docker/stars/jc21/nginx-proxy-manager.svg?style=for-the-badge">
77
</a>
@@ -205,6 +205,30 @@ Special thanks to the following contributors:
205205
<br /><sub><b>Philip Mooney</b></sub>
206206
</a>
207207
</td>
208+
<td align="center">
209+
<a href="https://github.com/WaterCalm">
210+
<img src="https://avatars1.githubusercontent.com/u/23502129?s=400&v=4" width="80px;" alt=""/>
211+
<br /><sub><b>WaterCalm</b></sub>
212+
</a>
213+
</td>
214+
<td align="center">
215+
<a href="https://github.com/lebrou34">
216+
<img src="https://avatars1.githubusercontent.com/u/16373103?s=460&v=4" width="80px;" alt=""/>
217+
<br /><sub><b>lebrou34</b></sub>
218+
</a>
219+
</td>
220+
<td align="center">
221+
<a href="https://github.com/lightglitch">
222+
<img src="https://avatars0.githubusercontent.com/u/196953?s=460&v=4" width="80px;" alt=""/>
223+
<br /><sub><b>Mário Franco</b></sub>
224+
</a>
225+
</td>
226+
<td align="center">
227+
<a href="https://github.com/klutchell">
228+
<img src="https://avatars3.githubusercontent.com/u/20458272?s=460&v=4" width="80px;" alt=""/>
229+
<br /><sub><b>Kyle Harding</b></sub>
230+
</a>
231+
</td>
208232
</tr>
209233
</table>
210234
<!-- markdownlint-enable -->

backend/internal/certificate.js

+20-12
Original file line numberDiff line numberDiff line change
@@ -615,18 +615,26 @@ const internalCertificate = {
615615
checkPrivateKey: (private_key) => {
616616
return tempWrite(private_key, '/tmp')
617617
.then((filepath) => {
618-
let key_type = private_key.includes('-----BEGIN RSA') ? 'rsa' : 'ec';
619-
return utils.exec('openssl ' + key_type + ' -in ' + filepath + ' -check -noout 2>&1 ')
620-
.then((result) => {
621-
if (!result.toLowerCase().includes('key ok') && !result.toLowerCase().includes('key valid') ) {
622-
throw new error.ValidationError('Result Validation Error: ' + result);
623-
}
624-
fs.unlinkSync(filepath);
625-
return true;
626-
}).catch((err) => {
627-
fs.unlinkSync(filepath);
628-
throw new error.ValidationError('Certificate Key is not valid (' + err.message + ')', err);
629-
});
618+
return new Promise((resolve, reject) => {
619+
const failTimeout = setTimeout(() => {
620+
reject(new error.ValidationError('Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.'));
621+
}, 10000);
622+
utils
623+
.exec('openssl pkey -in ' + filepath + ' -check -noout 2>&1 ')
624+
.then((result) => {
625+
clearTimeout(failTimeout);
626+
if (!result.toLowerCase().includes('key is valid')) {
627+
reject(new error.ValidationError('Result Validation Error: ' + result));
628+
}
629+
fs.unlinkSync(filepath);
630+
resolve(true);
631+
})
632+
.catch((err) => {
633+
clearTimeout(failTimeout);
634+
fs.unlinkSync(filepath);
635+
reject(new error.ValidationError('Certificate Key is not valid (' + err.message + ')', err));
636+
});
637+
});
630638
});
631639
},
632640

backend/internal/host.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const internalHost = {
106106
response_object.total_count += response_object.redirection_hosts.length;
107107
}
108108

109-
if (promises_results[1]) {
109+
if (promises_results[2]) {
110110
// Dead Hosts
111111
response_object.dead_hosts = internalHost._getHostsWithDomains(promises_results[2], domain_names);
112112
response_object.total_count += response_object.dead_hosts.length;
@@ -158,7 +158,7 @@ const internalHost = {
158158
}
159159
}
160160

161-
if (promises_results[1]) {
161+
if (promises_results[2]) {
162162
// Dead Hosts
163163
if (internalHost._checkHostnameRecordsTaken(hostname, promises_results[2], ignore_type === 'dead' && ignore_id ? ignore_id : 0)) {
164164
is_taken = true;

backend/yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1548,9 +1548,9 @@ inherits@2.0.3:
15481548
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
15491549

15501550
ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
1551-
version "1.3.5"
1552-
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
1553-
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
1551+
version "1.3.8"
1552+
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
1553+
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
15541554

15551555
inquirer@^7.0.0:
15561556
version "7.3.3"

docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ EXPOSE 443
3434
COPY docker/rootfs /
3535
ADD backend /app
3636
ADD frontend/dist /app/frontend
37-
COPY global /app/global
37+
COPY global /app/global
3838

3939
WORKDIR /app
4040
RUN yarn install

docker/docker-compose.ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ services:
4747
cypress-mysql:
4848
image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
4949
build:
50-
context: ../
51-
dockerfile: test/cypress/Dockerfile
50+
context: ../test/
51+
dockerfile: cypress/Dockerfile
5252
environment:
5353
CYPRESS_baseUrl: "http://fullstack-mysql:81"
5454
volumes:
@@ -58,8 +58,8 @@ services:
5858
cypress-sqlite:
5959
image: ${IMAGE}-cypress:ci-${BUILD_NUMBER}
6060
build:
61-
context: ../
62-
dockerfile: test/cypress/Dockerfile
61+
context: ../test/
62+
dockerfile: cypress/Dockerfile
6363
environment:
6464
CYPRESS_baseUrl: "http://fullstack-sqlite:81"
6565
volumes:

docker/rootfs/etc/nginx/nginx.conf

+3
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ http {
8484
stream {
8585
# Files generated by NPM
8686
include /data/nginx/stream/*.conf;
87+
88+
# Custom
89+
include /data/nginx/custom/stream[.]conf;
8790
}
8891

8992
# Custom

docs/advanced-config/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ You can add your custom configuration snippet files at `/data/nginx/custom` as f
2424

2525
- `/data/nginx/custom/root.conf`: Included at the very end of nginx.conf
2626
- `/data/nginx/custom/http.conf`: Included at the end of the main http block
27+
- `/data/nginx/custom/stream.conf`: Included at the end of the main stream block
2728
- `/data/nginx/custom/server_proxy.conf`: Included at the end of every proxy server block
2829
- `/data/nginx/custom/server_redirect.conf`: Included at the end of every redirection server block
2930
- `/data/nginx/custom/server_stream.conf`: Included at the end of every stream server block

docs/yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -5125,9 +5125,9 @@ inherits@2.0.3:
51255125
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
51265126

51275127
ini@^1.3.5, ini@~1.3.0:
5128-
version "1.3.5"
5129-
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
5130-
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
5128+
version "1.3.8"
5129+
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
5130+
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
51315131

51325132
internal-ip@^4.3.0:
51335133
version "4.3.0"

frontend/js/app/nginx/certificates/form.ejs

+3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
</div>
130130
<% } else if (provider === 'other') { %>
131131
<!-- Other -->
132+
<div class="col-sm-12 col-md-12">
133+
<div class="text-blue mb-4"><i class="fe fe-alert-triangle"></i> <%= i18n('ssl', 'passphrase-protection-support-info') %></div>
134+
</div>
132135
<div class="col-sm-12 col-md-12">
133136
<div class="form-group">
134137
<label class="form-label"><%- i18n('str', 'name') %> <span class="form-required">*</span></label>

frontend/js/i18n/messages.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@
112112
"stored-as-plaintext-info": "This data will be stored as plaintext in the database and in a file!",
113113
"propagation-seconds": "Propagation Seconds",
114114
"propagation-seconds-info": "Leave empty to use the plugins default value. Number of seconds to wait for DNS propagation.",
115-
"processing-info": "Processing... This might take a few minutes."
115+
"processing-info": "Processing... This might take a few minutes.",
116+
"passphrase-protection-support-info": "Key files protected with a passphrase are not supported."
116117
},
117118
"proxy-hosts": {
118119
"title": "Proxy Hosts",

global/certbot-dns-plugins.js

+20-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020
*/
2121

2222
module.exports = {
23+
aliyun: {
24+
display_name: 'Aliyun',
25+
package_name: 'certbot-dns-aliyun',
26+
package_version: '0.38.1',
27+
dependencies: '',
28+
credentials: `certbot_dns_aliyun:dns_aliyun_access_key = 12345678
29+
certbot_dns_aliyun:dns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef`,
30+
full_plugin_name: 'certbot-dns-aliyun:dns-aliyun',
31+
},
32+
//####################################################//
2333
cloudflare: {
2434
display_name: 'Cloudflare',
2535
package_name: 'certbot-dns-cloudflare',
@@ -110,6 +120,15 @@ certbot_dns_dnspod:dns_dnspod_api_token = "DNSPOD-API-TOKEN"`,
110120
full_plugin_name: 'certbot-dns-dnspod:dns-dnspod',
111121
},
112122
//####################################################//
123+
gandi: {
124+
display_name: 'Gandi Live DNS',
125+
package_name: 'certbot_plugin_gandi',
126+
package_version: '1.2.5',
127+
dependencies: '',
128+
credentials: 'certbot_plugin_gandi:dns_api_key = APIKEY',
129+
full_plugin_name: 'certbot-plugin-gandi:dns',
130+
},
131+
//####################################################//
113132
google: {
114133
display_name: 'Google',
115134
package_name: 'certbot-dns-google',
@@ -272,4 +291,4 @@ aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,
272291
credentials: 'certbot_dns_vultr:dns_vultr_key = YOUR_VULTR_API_KEY',
273292
full_plugin_name: 'certbot-dns-vultr:dns-vultr',
274293
},
275-
};
294+
};

test/.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

test/cypress/Dockerfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
FROM cypress/included:4.12.1
1+
FROM cypress/included:5.6.0
22

3-
COPY --chown=1000 ./test /test
3+
COPY --chown=1000 ./ /test
4+
5+
# mkcert
6+
ENV MKCERT=1.4.2
7+
RUN wget -O /usr/bin/mkcert "https://github.com/FiloSottile/mkcert/releases/download/v${MKCERT}/mkcert-v${MKCERT}-linux-amd64" \
8+
&& chmod +x /usr/bin/mkcert
49

510
WORKDIR /test
611
RUN yarn install

test/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@jc21/cypress-swagger-validation": "^0.0.9",
88
"@jc21/restler": "^3.4.0",
99
"chalk": "^4.1.0",
10-
"cypress": "^4.12.1",
10+
"cypress": "^5.6.0",
1111
"cypress-multi-reporters": "^1.4.0",
1212
"cypress-plugin-retries": "^1.5.2",
1313
"eslint": "^7.6.0",

test/yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1293,9 +1293,9 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.3:
12931293
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
12941294

12951295
ini@^1.3.5:
1296-
version "1.3.5"
1297-
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
1298-
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
1296+
version "1.3.8"
1297+
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
1298+
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
12991299

13001300
is-arguments@^1.0.4:
13011301
version "1.0.4"

0 commit comments

Comments
 (0)