Compare commits

..

4 Commits

Author SHA1 Message Date
Louis Lam
f1e2ee74ea Update to 1.23.11 2023-12-31 05:46:54 +08:00
Louis Lam
8d847abf35 Update dependencies 2023-12-31 05:09:45 +08:00
Louis Lam
8151ac0e25 Fix Async child process output issue (#4231) 2023-12-14 04:54:34 +08:00
Nelson Chan
4185ec20b0 Fix: Origin undefined on error handling (#4224) 2023-12-13 01:35:39 +08:00
5 changed files with 396 additions and 379 deletions

759
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "uptime-kuma", "name": "uptime-kuma",
"version": "1.23.10", "version": "1.23.11",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -42,7 +42,7 @@
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
"build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push", "build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push",
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain", "upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
"setup": "git checkout 1.23.10 && npm ci --production && npm run download-dist", "setup": "git checkout 1.23.11 && npm ci --production && npm run download-dist",
"download-dist": "node extra/download-dist.js", "download-dist": "node extra/download-dist.js",
"mark-as-nightly": "node extra/mark-as-nightly.js", "mark-as-nightly": "node extra/mark-as-nightly.js",
"reset-password": "node extra/reset-password.js", "reset-password": "node extra/reset-password.js",

View File

@@ -39,7 +39,8 @@ class TailscalePing extends MonitorType {
async runTailscalePing(hostname, interval) { async runTailscalePing(hostname, interval) {
let timeout = interval * 1000 * 0.8; let timeout = interval * 1000 * 0.8;
let res = await childProcessAsync.spawn("tailscale", [ "ping", "--c", "1", hostname ], { let res = await childProcessAsync.spawn("tailscale", [ "ping", "--c", "1", hostname ], {
timeout: timeout timeout: timeout,
encoding: "utf8",
}); });
if (res.stderr && res.stderr.toString()) { if (res.stderr && res.stderr.toString()) {
throw new Error(`Error in output: ${res.stderr.toString()}`); throw new Error(`Error in output: ${res.stderr.toString()}`);

View File

@@ -11,7 +11,9 @@ class Apprise extends NotificationProvider {
args.push("-t"); args.push("-t");
args.push(notification.title); args.push(notification.title);
} }
const s = await childProcessAsync.spawn("apprise", args); const s = await childProcessAsync.spawn("apprise", args, {
encoding: "utf8",
});
const output = (s.stdout) ? s.stdout.toString() : "ERROR: maybe apprise not found"; const output = (s.stdout) ? s.stdout.toString() : "ERROR: maybe apprise not found";

View File

@@ -134,9 +134,10 @@ class UptimeKumaServer {
log.info("auth", "WebSocket with no origin is allowed"); log.info("auth", "WebSocket with no origin is allowed");
callback(null, true); callback(null, true);
} else { } else {
let host = req.headers.host;
let origin = req.headers.origin;
try { try {
let host = req.headers.host;
let origin = req.headers.origin;
let originURL = new URL(origin); let originURL = new URL(origin);
let xForwardedFor; let xForwardedFor;
if (await Settings.get("trustProxy")) { if (await Settings.get("trustProxy")) {