Skip to content

Commit 4ab6db3

Browse files
authored
Merge branch 'master' into master
2 parents 8985c5e + be2faf6 commit 4ab6db3

30 files changed

+2475
-1373
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Requirements:
6262
- Platform
6363
- ✅ Major Linux distros such as Debian, Ubuntu, CentOS, Fedora and ArchLinux etc.
6464
- ✅ Windows 10 (x64), Windows Server 2012 R2 (x64) or higher
65+
- ❌ FreeBSD / OpenBSD / NetBSD
6566
- ❌ Replit / Heroku
6667
- [Node.js](https://nodejs.org/en/download/) 18 / 20.4
6768
- [npm](https://docs.npmjs.com/cli/) 9

extra/release/lib.mjs

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,30 @@ export function buildImage(repoNames, tags, target, buildArgs = "", dockerfile =
101101
/**
102102
* Check if the version already exists on Docker Hub
103103
* TODO: use semver to compare versions if it is greater than the previous?
104-
* @param {string} repoName Docker Hub repository name
104+
* @param {string[]} repoNames repository name (Only check the name with single slash)
105105
* @param {string} version Version to check
106106
* @returns {void}
107107
*/
108-
export async function checkTagExists(repoName, version) {
109-
console.log(`Checking if version ${version} exists on Docker Hub`);
108+
export async function checkTagExists(repoNames, version) {
109+
// Skip if the tag is not on Docker Hub
110+
// louislam/uptime-kuma
111+
let dockerHubRepoNames = repoNames.filter((name) => {
112+
return name.split("/").length === 2;
113+
});
114+
115+
for (let repoName of dockerHubRepoNames) {
116+
await checkTagExistsSingle(repoName, version);
117+
}
118+
}
119+
120+
/**
121+
* Check if the version already exists on Docker Hub
122+
* @param {string} repoName repository name
123+
* @param {string} version Version to check
124+
* @returns {Promise<void>}
125+
*/
126+
export async function checkTagExistsSingle(repoName, version) {
127+
console.log(`Checking if version ${version} exists on Docker Hub:`, repoName);
110128

111129
// Get a list of tags from the Docker Hub repository
112130
let tags = [];

package-lock.json

Lines changed: 1842 additions & 1286 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uptime-kuma",
3-
"version": "2.0.0-beta.0",
3+
"version": "2.0.0-beta.1",
44
"license": "MIT",
55
"repository": {
66
"type": "git",

server/database.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -892,11 +892,13 @@ class Database {
892892
AND important = 0
893893
AND time < ${sqlHourOffset}
894894
AND id NOT IN (
895-
SELECT id
896-
FROM heartbeat
897-
WHERE monitor_id = ?
898-
ORDER BY time DESC
899-
LIMIT ?
895+
SELECT id FROM ( -- written this way for Maria's support
896+
SELECT id
897+
FROM heartbeat
898+
WHERE monitor_id = ?
899+
ORDER BY time DESC
900+
LIMIT ?
901+
) AS limited_ids
900902
)
901903
`, [
902904
monitor.id,

server/monitor-types/real-browser-monitor-type.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,14 @@ class RealBrowserMonitorType extends MonitorType {
240240
const context = await browser.newContext();
241241
const page = await context.newPage();
242242

243+
// Prevent Local File Inclusion
244+
// Accept only http:// and https://
245+
// https://github.com/louislam/uptime-kuma/security/advisories/GHSA-2qgm-m29m-cj2h
246+
let url = new URL(monitor.url);
247+
if (url.protocol !== "http:" && url.protocol !== "https:") {
248+
throw new Error("Invalid url protocol, only http and https are allowed.");
249+
}
250+
243251
const res = await page.goto(monitor.url, {
244252
waitUntil: "networkidle",
245253
timeout: monitor.interval * 1000 * 0.8,

src/components/EditMonitorConditions.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ export default {
7373
}
7474
},
7575
76-
created() {
77-
if (this.model.length === 0) {
78-
this.addCondition();
79-
}
80-
},
81-
8276
methods: {
8377
getNewGroup() {
8478
return {

src/components/TagsManager.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default {
197197
return tagOptions;
198198
},
199199
selectedTags() {
200-
return this.preSelectedTags.concat(this.newTags).filter(tag => !this.deleteTags.find(monitorTag => monitorTag.id === tag.id));
200+
return this.preSelectedTags.concat(this.newTags).filter(tag => !this.deleteTags.find(monitorTag => monitorTag.tag_id === tag.tag_id));
201201
},
202202
colorOptions() {
203203
return colorOptions(this);

src/lang/ar.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,5 +733,11 @@
733733
"Remove the expiry notification": "إزالة تنبيه يوم تاريخ الإنتهاء",
734734
"tailscalePingWarning": "من أجل استخدام مراقبة Tailscale Ping، تحتاج إلى تثبيت Uptime Kuma بدون Docker وكذلك تثبيت عميل Tailscale على الخادم الخاص بك.",
735735
"Clone Monitor": "نسخ المراقبة",
736-
"telegramMessageThreadIDDescription": "معرف فريد اختياري لسلسلة الرسائل المستهدفة (الموضوع) في المنتدى؛ لمجموعات المنتدى الكبرى فقط"
736+
"telegramMessageThreadIDDescription": "معرف فريد اختياري لسلسلة الرسائل المستهدفة (الموضوع) في المنتدى؛ لمجموعات المنتدى الكبرى فقط",
737+
"emailCustomBody": "نص مخصص",
738+
"emailTemplateStatus": "الحالة",
739+
"leave blank for default subject": "اترك فارغاً ليتم تعيين الموضوع تلقائياً",
740+
"leave blank for default body": "اترك فارغاً ليتم تعيين النص تلقائياً",
741+
"emailTemplateServiceName": "اسم الخدمة",
742+
"emailTemplateHostnameOrURL": "اسم المضيف أو عنوان URL"
737743
}

src/lang/bg-BG.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,5 +1097,6 @@
10971097
"Separate multiple email addresses with commas": "Разделяйте отделните имейл адреси със запетаи",
10981098
"RabbitMQ Nodes": "Възли за управление на RabbitMQ",
10991099
"rabbitmqNodesDescription": "Въведете URL адреса на възлите за управление на RabbitMQ, включително протокол и порт. Пример: {0}",
1100-
"rabbitmqHelpText": "За да използвате монитора, ще трябва да активирате добавката за управление във вашата настройка на RabbitMQ. За повече информация моля, вижте {rabitmq_documentation}."
1100+
"rabbitmqHelpText": "За да използвате монитора, ще трябва да активирате добавката за управление във вашата настройка на RabbitMQ. За повече информация моля, вижте {rabitmq_documentation}.",
1101+
"aboutSlackUsername": "Променя показваното име на подателя на съобщението. Ако желаете да споменете някого, вместо това го включете в приятелското име."
11011102
}

0 commit comments

Comments
 (0)