Skip to content

Commit 6e62aa2

Browse files
renovate[bot]Zoey2936
authored andcommitted
dep updates/merge NginxProxyManager#3190 from upstream/fix #407
Signed-off-by: Zoey <[email protected]>
1 parent c943ccd commit 6e62aa2

17 files changed

+69
-74
lines changed

.github/workflows/caddy-fmt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Read version
1818
id: version
1919
run: echo "version=$(cat Caddy.Dockerfile | grep -wE "FROM caddy:*" | head -1 | sed "s|FROM caddy:||g")" >> $GITHUB_OUTPUT

.github/workflows/caddy-latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
steps:
88
- name: Login to DockerHub
99
if: github.event_name != 'pull_request'
10-
uses: docker/login-action@v2
10+
uses: docker/login-action@v3
1111
with:
1212
username: ${{ secrets.DOCKER_USERNAME }}
1313
password: ${{ secrets.DOCKER_PASSWORD }}
1414
- name: Convert Username
1515
id: un
1616
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
1717
- name: Login to GitHub Container Registry
18-
uses: docker/login-action@v2
18+
uses: docker/login-action@v3
1919
with:
2020
registry: ghcr.io
2121
username: ${{ steps.un.outputs.un }}

.github/workflows/caddy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
- name: Set up QEMU
18-
uses: docker/setup-qemu-action@v2
18+
uses: docker/setup-qemu-action@v3
1919
with:
2020
platforms: arm64 #all
2121
- name: Set up Docker Buildx
22-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
2323
with:
2424
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1
2525
- name: Login to DockerHub
2626
if: ${{ github.event_name != 'pull_request' }}
27-
uses: docker/login-action@v2
27+
uses: docker/login-action@v3
2828
with:
2929
username: ${{ secrets.DOCKER_USERNAME }}
3030
password: ${{ secrets.DOCKER_PASSWORD }}
3131
- name: Convert Username
3232
id: un
3333
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
3434
- name: Login to GitHub Container Registry
35-
uses: docker/login-action@v2
35+
uses: docker/login-action@v3
3636
with:
3737
registry: ghcr.io
3838
username: ${{ steps.un.outputs.un }}
3939
password: ${{ github.token }}
4040
- name: Build
41-
uses: docker/build-push-action@v4
41+
uses: docker/build-push-action@v5
4242
if: ${{ github.event_name != 'pull_request' }}
4343
with:
4444
context: .

.github/workflows/docker-latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
steps:
88
- name: Login to DockerHub
99
if: github.event_name != 'pull_request'
10-
uses: docker/login-action@v2
10+
uses: docker/login-action@v3
1111
with:
1212
username: ${{ secrets.DOCKER_USERNAME }}
1313
password: ${{ secrets.DOCKER_PASSWORD }}
1414
- name: Convert Username
1515
id: un
1616
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
1717
- name: Login to GitHub Container Registry
18-
uses: docker/login-action@v2
18+
uses: docker/login-action@v3
1919
with:
2020
registry: ghcr.io
2121
username: ${{ steps.un.outputs.un }}

.github/workflows/docker.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
- name: Set up QEMU
29-
uses: docker/setup-qemu-action@v2
29+
uses: docker/setup-qemu-action@v3
3030
with:
3131
platforms: arm64 #all
3232
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v2
33+
uses: docker/setup-buildx-action@v3
3434
with:
3535
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1
3636
- name: Login to DockerHub
3737
if: ${{ github.event_name != 'pull_request' }}
38-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
3939
with:
4040
username: ${{ secrets.DOCKER_USERNAME }}
4141
password: ${{ secrets.DOCKER_PASSWORD }}
4242
- name: Convert Username
4343
id: un
4444
run: echo "un=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
4545
- name: Login to GitHub Container Registry
46-
uses: docker/login-action@v2
46+
uses: docker/login-action@v3
4747
with:
4848
registry: ghcr.io
4949
username: ${{ steps.un.outputs.un }}
@@ -55,7 +55,7 @@ jobs:
5555
sed -i "s|\"0.0.0\"|\"$version\"|g" frontend/package.json
5656
sed -i "s|\"0.0.0\"|\"$version\"|g" backend/package.json
5757
- name: Build
58-
uses: docker/build-push-action@v4
58+
uses: docker/build-push-action@v5
5959
if: ${{ github.event_name != 'pull_request' }}
6060
with:
6161
context: .
@@ -77,7 +77,7 @@ jobs:
7777
id: pr
7878
run: echo "pr=$(echo pr-${{ github.ref_name }} | sed "s|refs/pull/:||g" | sed "s|/merge||g")" >> $GITHUB_OUTPUT
7979
- name: Build (PR)
80-
uses: docker/build-push-action@v4
80+
uses: docker/build-push-action@v5
8181
if: ${{ github.event_name == 'pull_request' }}
8282
with:
8383
context: .

.github/workflows/js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- uses: actions/setup-node@v3
1414
with:
1515
node-version: 19

.github/workflows/json.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
test-json:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- name: json-syntax-check
1212
uses: limitusus/json-syntax-check@v2
1313
with:

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Check Shell
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- name: Run Shellcheck
1313
uses: ludeeus/action-shellcheck@master
1414
with:

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out code.
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: Check spelling
1414
uses: codespell-project/actions-codespell@v2
1515
with:

.github/workflows/yq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout
9-
uses: actions/checkout@v3
9+
uses: actions/checkout@v4
1010
with:
1111
token: ${{ secrets.YQ }}
1212
- name: update workflows

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN apk add --no-cache ca-certificates git build-base && \
5353
sed -i "s|CAPTCHA_TEMPLATE_PATH=.*|CAPTCHA_TEMPLATE_PATH=/data/etc/crowdsec/captcha.html|g" lua-mod/config_example.conf
5454

5555

56-
FROM zoeyvid/nginx-quic:183
56+
FROM zoeyvid/nginx-quic:197
5757
COPY rootfs /
5858
RUN apk add --no-cache ca-certificates tzdata tini \
5959
lua5.1-lzlib \

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ running at home or otherwise, including free TLS, without having to know too muc
2020
- [Screenshots](https://nginxproxymanager.com/screenshots)
2121

2222

23-
**Note: To fix [this issue](https://github.com/SpiderLabs/ModSecurity/issues/2848), instead of running `nginx -s reload`, this fork stops nginx and starts it again. This will result in a 502 error when you update your hosts. See https://github.com/ZoeyVid/nginx-proxy-manager/issues/296 and https://github.com/ZoeyVid/nginx-proxy-manager/issues/283.** <br>
23+
**Note: To fix [this issue](https://github.com/SpiderLabs/ModSecurity/issues/2848), instead of running `nginx -s reload`, this fork stops nginx and starts it again. This can result in a 502 error when you update your hosts. See https://github.com/ZoeyVid/nginx-proxy-manager/issues/296 and https://github.com/ZoeyVid/nginx-proxy-manager/issues/283.** <br>
2424
**Note: NO armv7 support.** <br>
2525
**Note: add `net.ipv4.ip_unprivileged_port_start=0` at the end of `/etc/sysctl.conf` to support PUID/PGID in network mode host.** <br>
26+
**Note: If you don't use network mode host, which I don't recommend, don't forget to expose port 443 on tcp AND udp (http3/quic needs udp).** <br>
27+
**Note: If you don't use network mode host, which I don't recommend, don't forget to enable IPv6 in Docker, see [here](https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md), you only need to edit the daemon.json and restart docker, if you use the bridge network, otherwise please enable IPv6 in your custom docker network!** <br>
28+
**Note: Don't forget to open Port 80 (tcp) and 443 (tcp AND udp, http3/quic needs udp) in your firewall (because of network mode host, you also need to open this ports in ufw, if you use ufw).** <br>
2629

2730

2831
## Project Goal

backend/internal/certificate.js

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ const internalCertificate = {
4444
const cmd = certbotCommand + ' renew --quiet ' +
4545
'--config "' + certbotConfig + '" ' +
4646
'--preferred-challenges "dns,http" ' +
47-
'--no-random-sleep-on-renew ' +
48-
'--disable-hook-validation ';
47+
'--no-random-sleep-on-renew';
4948

5049
return utils.exec(cmd)
5150
.then((result) => {
@@ -637,29 +636,27 @@ const internalCertificate = {
637636
checkPrivateKey: (private_key) => {
638637
const randomName = crypto.randomBytes(8).toString('hex');
639638
const filepath = path.join('/tmp', 'certificate_' + randomName);
640-
return fs.writeFileSync(filepath, private_key)
641-
.then(() => {
642-
return new Promise((resolve, reject) => {
643-
const failTimeout = setTimeout(() => {
644-
reject(new error.ValidationError('Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.'));
645-
}, 10000);
646-
utils
647-
.exec('openssl pkey -in ' + filepath + ' -check -noout 2>&1 ')
648-
.then((result) => {
649-
clearTimeout(failTimeout);
650-
if (!result.toLowerCase().includes('key is valid')) {
651-
reject(new error.ValidationError('Result Validation Error: ' + result));
652-
}
653-
fs.unlinkSync(filepath);
654-
resolve(true);
655-
})
656-
.catch((err) => {
657-
clearTimeout(failTimeout);
658-
fs.unlinkSync(filepath);
659-
reject(new error.ValidationError('Certificate Key is not valid (' + err.message + ')', err));
660-
});
639+
fs.writeFileSync(filepath, private_key);
640+
return new Promise((resolve, reject) => {
641+
const failTimeout = setTimeout(() => {
642+
reject(new error.ValidationError('Result Validation Error: Validation timed out. This could be due to the key being passphrase-protected.'));
643+
}, 10000);
644+
utils
645+
.exec('openssl pkey -in ' + filepath + ' -check -noout 2>&1 ')
646+
.then((result) => {
647+
clearTimeout(failTimeout);
648+
if (!result.toLowerCase().includes('key is valid')) {
649+
reject(new error.ValidationError('Result Validation Error: ' + result));
650+
}
651+
fs.unlinkSync(filepath);
652+
resolve(true);
653+
})
654+
.catch((err) => {
655+
clearTimeout(failTimeout);
656+
fs.unlinkSync(filepath);
657+
reject(new error.ValidationError('Certificate Key is not valid (' + err.message + ')', err));
661658
});
662-
});
659+
});
663660
},
664661

665662
/**
@@ -671,17 +668,15 @@ const internalCertificate = {
671668
*/
672669
getCertificateInfo: (certificate, throw_expired) => {
673670
const randomName = crypto.randomBytes(8).toString('hex');
674-
const filepath = path.join('/root', 'certificate_' + randomName);
675-
return fs.writeFileSync(filepath, certificate)
676-
.then(() => {
677-
return internalCertificate.getCertificateInfoFromFile(filepath, throw_expired)
678-
.then((certData) => {
679-
fs.unlinkSync(filepath);
680-
return certData;
681-
}).catch((err) => {
682-
fs.unlinkSync(filepath);
683-
throw err;
684-
});
671+
const filepath = path.join('/tmp', 'certificate_' + randomName);
672+
fs.writeFileSync(filepath, certificate);
673+
return internalCertificate.getCertificateInfoFromFile(filepath, throw_expired)
674+
.then((certData) => {
675+
fs.unlinkSync(filepath);
676+
return certData;
677+
}).catch((err) => {
678+
fs.unlinkSync(filepath);
679+
throw err;
685680
});
686681
},
687682

@@ -933,8 +928,7 @@ const internalCertificate = {
933928
'--config "' + certbotConfig + '" ' +
934929
'--cert-name "npm-' + certificate.id + '" ' +
935930
'--preferred-challenges "dns,http" ' +
936-
'--no-random-sleep-on-renew ' +
937-
'--disable-hook-validation ';
931+
'--no-random-sleep-on-renew';
938932

939933
logger.info('Command:', cmd);
940934

@@ -962,8 +956,7 @@ const internalCertificate = {
962956
'--config "' + certbotConfig + '" ' +
963957
'--cert-name "npm-' + certificate.id + '" ' +
964958
'--preferred-challenges "dns,http" ' +
965-
'--no-random-sleep-on-renew ' +
966-
'--disable-hook-validation ';
959+
'--no-random-sleep-on-renew';
967960

968961
// Prepend the path to the credentials file as an environment variable
969962
if (certificate.meta.dns_provider === 'route53') {
@@ -990,6 +983,7 @@ const internalCertificate = {
990983

991984
const mainCmd = certbotCommand + ' revoke ' +
992985
'--config "' + certbotConfig + '" ' +
986+
'--cert-path "/data/tls/certbot/live/npm-' + certificate.id + '/privkey.pem" ' +
993987
'--cert-path "/data/tls/certbot/live/npm-' + certificate.id + '/fullchain.pem" ' +
994988
'--delete-after-revoke';
995989

backend/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "js/index.js",
66
"dependencies": {
7-
"@apidevtools/json-schema-ref-parser": "10.1.0",
7+
"@apidevtools/json-schema-ref-parser": "11.1.0",
88
"ajv": "6.12.6",
9-
"archiver": "6.0.0",
9+
"archiver": "6.0.1",
1010
"batchflow": "0.4.0",
1111
"bcrypt": "5.1.1",
1212
"body-parser": "1.20.2",
1313
"compression": "1.7.4",
1414
"express": "4.18.2",
15-
"express-fileupload": "1.4.0",
15+
"express-fileupload": "1.4.1",
1616
"gravatar": "1.8.2",
1717
"jsonwebtoken": "9.0.2",
1818
"knex": "2.5.1",
@@ -26,13 +26,10 @@
2626
"signale": "1.4.0",
2727
"sqlite3": "5.1.6"
2828
},
29-
"resolutions": {
30-
"semver": "7.5.4"
31-
},
3229
"author": "Jamie Curnow <[email protected]>",
3330
"license": "MIT",
3431
"devDependencies": {
35-
"eslint": "8.48.0",
32+
"eslint": "8.50.0",
3633
"eslint-plugin-align-assignments": "1.1.2"
3734
}
3835
}

frontend/html/partials/header.ejs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<meta name="mobile-web-app-capable" content="yes" />
1111
<meta name="HandheldFriendly" content="True" />
1212
<meta name="MobileOptimized" content="320" />
13+
<meta name="robots" content="noindex">
1314
<title><%- title %></title>
1415
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-touch-icon.png" />
1516
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicons/favicon-32x32.png" />

frontend/js/app/nginx/proxy/location-item.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<div class="col-sm-4 col-md-4">
4646
<div class="form-group">
4747
<label class="form-label"><%- i18n('proxy-hosts', 'forward-port') %> <span class="form-required">*</span></label>
48-
<input name="forward_port" type="number" class="form-control text-monospace model" placeholder="80" value="<%- forward_port %>" required>
48+
<input name="forward_port" type="number" class="form-control text-monospace model" placeholder="80" min="1" max="65535" value="<%- forward_port %>" required>
4949
</div>
5050
</div>
5151
</div>

frontend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "A beautiful interface for creating Nginx endpoints",
55
"main": "js/index.js",
66
"dependencies": {
7-
"@babel/core": "7.22.11",
7+
"@babel/core": "7.23.0",
88
"babel-core": "6.26.3",
99
"babel-loader": "8.3.0",
1010
"babel-preset-env": "1.7.0",
@@ -34,7 +34,7 @@
3434
"style-loader": "3.3.3",
3535
"tabler-ui": "git+https://github.com/tabler/tabler.git#00f78ad823311bc3ad974ac3e5b0126198f0a813",
3636
"underscore": "1.13.6",
37-
"webpack": "4.46.0",
37+
"webpack": "4.47.0",
3838
"webpack-cli": "4.10.0",
3939
"webpack-visualizer-plugin": "0.1.11"
4040
},

0 commit comments

Comments
 (0)