From 5a69f52653772b2791149c4d83526a3c37333d11 Mon Sep 17 00:00:00 2001 From: Nans-ssss <146657048+Nans-ssss@users.noreply.github.com> Date: Sun, 15 Feb 2026 16:38:39 +0100 Subject: [PATCH 1/4] Add french translation (#190) --- locales/fr-FR/common.json | 37 +++++++++++++++++++++++++++++++++++++ util/i18n.ts | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 locales/fr-FR/common.json diff --git a/locales/fr-FR/common.json b/locales/fr-FR/common.json new file mode 100644 index 0000000..e28074b --- /dev/null +++ b/locales/fr-FR/common.json @@ -0,0 +1,37 @@ +{ + "Incidents": "Incidents", + "No data yet": "Aucune donnée pour le moment", + "All systems not operational": "Aucun système n'est opérationnel", + "All systems operational": "Tous les systèmes sont opérationnels", + "Some systems not operational": "Certains systèmes ne fonctionnent pas ({{down}} sur {{total}})", + "Last updated on": "Dernière actualisation : {{date}} (il y a {{seconds}} secondes)", + "upcoming maintenance": "{{count}} maintenance à venir", + "upcoming maintenance_plural": "{{count}} maintenances à venir", + "Hide": "[Masquer]", + "Show": "[Afficher]", + "Operational": "Opérationnel", + "No data available": "Aucune donnée disponible. Veuillez vous assurer d'avoir déployé vos workers avec la dernière configuration et vérifiez leur statut !", + "Overall": "Moyenne : {{percent}}%", + "No Data": "Aucune donnée", + "percent at date": "{{percent}}% le {{date}}", + "Down for": "Interruption de {{duration}} (cliquez pour plus de détails)", + "incidents at": "🚨 Incidents sur {{name}} le {{date}}", + "Response times": "Temps de réponse (ms)", + "Upcoming": "[À venir] ", + "Scheduled Maintenance": "Maintenance planifiée", + "Scheduled for": "Planifiée pour :", + "From": "De :", + "Expected end": "Fin prévue :", + "To": "À :", + "Until further notice": "Jusqu'à nouvel ordre", + "Affected components": "Composants affectés :", + "MONITOR ID NOT FOUND": "[ERR : ID DU MONITEUR INTROUVABLE]", + "No incidents in this month": "Aucun incident ce mois-ci", + "There are no incidents for this month": "Il n'y a aucun incident pour ce mois-ci.", + "Monitor not found": "Le moniteur avec l'ID {{id}} est introuvable !", + "Monitor State not defined": "L'état du moniteur n'est pas défini actuellement, veuillez vérifier le statut de votre worker et sa liaison !", + "All": "Tous", + "Select monitor": "Sélectionner un moniteur", + "Backwards": "← Précédent", + "Forward": "Suivant →" +} \ No newline at end of file diff --git a/util/i18n.ts b/util/i18n.ts index ff7f85a..54d912a 100644 --- a/util/i18n.ts +++ b/util/i18n.ts @@ -4,6 +4,7 @@ import LanguageDetector from 'i18next-browser-languagedetector' import en from '../locales/en/common.json' import zhCN from '../locales/zh-CN/common.json' import zhTW from '../locales/zh-TW/common.json' +import frFR from '../locales/fr-FR/common.json' i18n .use(LanguageDetector) @@ -14,6 +15,8 @@ i18n 'zh-CN': { common: zhCN }, zh: { common: zhCN }, 'zh-TW': { common: zhTW }, + fr: { common: frFR }, + 'fr-FR': { common: frFR }, }, fallbackLng: 'en', interpolation: { From ef8ab25f44e6efbd41db6f0fdac0a5ec5d73c107 Mon Sep 17 00:00:00 2001 From: Bennet Gallein Date: Tue, 17 Feb 2026 02:50:42 +0100 Subject: [PATCH 2/4] feat(i18n): add german language (#194) * feat(i18n): add german language * fix: change lang * fix: adjust --- locales/de-DE/common.json | 37 +++++++++++++++++++++++++++++++++++++ util/i18n.ts | 3 +++ 2 files changed, 40 insertions(+) create mode 100644 locales/de-DE/common.json diff --git a/locales/de-DE/common.json b/locales/de-DE/common.json new file mode 100644 index 0000000..9686989 --- /dev/null +++ b/locales/de-DE/common.json @@ -0,0 +1,37 @@ +{ + "Incidents": "Vorfälle", + "No data yet": "Noch keine Daten", + "All systems not operational": "Nicht alle Systeme funktionsfähig", + "All systems operational": "Alle Systeme funktionsfähig", + "Some systems not operational": "Manche Systeme sind nicht funktionsfähig ({{down}} von {{total}})", + "Last updated on": "Letzte Aktualisierung: {{date}} (vor {{seconds}} Sekunden)", + "upcoming maintenance": "{{count}} anstehende Wartung", + "upcoming maintenance_plural": "{{count}} anstehende Wartungen", + "Hide": "[verstecken]", + "Show": "[zeigen]", + "Operational": "Funktionsfähig", + "No data available": "Keine Daten verfügbar, stelle sicher dass der Worker mit der letzten Config-Version deployed wurde und prüfe den Worker-Status!", + "Overall": "Gesamt: {{percent}}%", + "No Data": "Keine Daten", + "percent at date": "{{percent}}% am {{date}}", + "Down for": "Ausfall für {{duration}} (Klick für Details)", + "incidents at": "🚨 {{name}} Vorfall am {{date}}", + "Response times": "Antwortzeiten (ms)", + "Upcoming": "[Geplant] ", + "Scheduled Maintenance": "Geplante Wartung", + "Scheduled for": "Geplant für:", + "From": "Von:", + "Expected end": "Voraussichtliches Ende:", + "To": "Bis:", + "Until further notice": "Bis auf Weiteres", + "Affected components": "Betroffene Komponenten:", + "MONITOR ID NOT FOUND": "[ERR: MONITOR ID NICHT GEFUNDEN]", + "No incidents in this month": "Keine Vorfälle diesen Monat", + "There are no incidents for this month": "Es gibt keine Vorfälle diesen Monat.", + "Monitor not found": "Monitor mit ID {{id}} nicht gefunden!", + "Monitor State not defined": "Monitor-Status ist nicht definiert. Prüfe den Worker-Status und das Binding!", + "All": "Alle", + "Select monitor": "Auswählen", + "Backwards": "← Zurück", + "Forward": "Vorwärts →" +} diff --git a/util/i18n.ts b/util/i18n.ts index 54d912a..5fed890 100644 --- a/util/i18n.ts +++ b/util/i18n.ts @@ -5,6 +5,7 @@ import en from '../locales/en/common.json' import zhCN from '../locales/zh-CN/common.json' import zhTW from '../locales/zh-TW/common.json' import frFR from '../locales/fr-FR/common.json' +import deDE from '../locales/de-DE/common.json' i18n .use(LanguageDetector) @@ -17,6 +18,8 @@ i18n 'zh-TW': { common: zhTW }, fr: { common: frFR }, 'fr-FR': { common: frFR }, + de: { common: deDE }, + 'de-DE': { common: deDE }, }, fallbackLng: 'en', interpolation: { From 377a5963c66ba9a798abebfe8d80378b053435e9 Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Wed, 4 Mar 2026 21:37:06 +0800 Subject: [PATCH 3/4] SECURITY: fix private config file leak --- .eslintrc.json | 33 +++++++++++++++++++++++++++++++-- README.md | 2 ++ pages/incidents.tsx | 23 +++++++++++++++++------ pages/index.tsx | 3 ++- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index bffb357..908c39c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,32 @@ { - "extends": "next/core-web-vitals" -} + "extends": "next/core-web-vitals", + "rules": { + "no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": [ + "**/uptime.config" + ], + "importNames": [ + "workerConfig" + ], + "message": "Do not import workerConfig in client-bundled files. See https://github.com/lyc8503/UptimeFlare/issues/198 for details." + } + ] + } + ] + }, + "overrides": [ + { + "files": [ + "pages/api/data.ts", + "middleware.ts" + ], + "rules": { + "no-restricted-imports": "off" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 1520bba..4d6ba68 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ A more advanced, serverless, and free uptime monitoring & status page solution, powered by Cloudflare Workers, complete with a user-friendly interface. +📢 **[SECURITY 2026/03/04]** A vulnerability that could expose monitor configuration and credentials in `uptime.config.ts` to clients was fixed. Versions between 2025-09-21 (from commit `41257c6`) and 2026-03-04 are affected. **Affected users are strongly advised to upgrade to the latest version.** + 🎉 **[UPDATE 2026/01/03]** I have just migrated UptimeFlare from KV to D1 Database. I also updated the Terraform Cloudflare provider to v5 and improved the deployment process. The data structure has been optimized to resolve long-standing performance issues. New users can deploy directly, while existing users can have a simple auto migration process (upgrade docs below)! Feel free to open an issue if you run into any trouble deploying. diff --git a/pages/incidents.tsx b/pages/incidents.tsx index 9cb5394..480e5e4 100644 --- a/pages/incidents.tsx +++ b/pages/incidents.tsx @@ -2,7 +2,7 @@ import Head from 'next/head' import { Inter } from 'next/font/google' import { MaintenanceConfig, MonitorTarget } from '@/types/config' -import { maintenances, pageConfig, workerConfig } from '@/uptime.config' +import { maintenances, pageConfig } from '@/uptime.config' import Header from '@/components/Header' import { Box, Button, Center, Container, Group, Select } from '@mantine/core' import Footer from '@/components/Footer' @@ -25,7 +25,8 @@ function getSelectedMonth() { function filterIncidentsByMonth( incidents: MaintenanceConfig[], - monthStr: string + monthStr: string, + monitors: MonitorTarget[] ): (Omit & { monitors: MonitorTarget[] })[] { return incidents .filter((incident) => { @@ -35,7 +36,7 @@ function filterIncidentsByMonth( }) .map((e) => ({ ...e, - monitors: (e.monitors || []).map((e) => workerConfig.monitors.find((mon) => mon.id === e)!), + monitors: (e.monitors || []).map((e) => monitors.find((mon) => mon.id === e)!), })) .sort((a, b) => (new Date(a.start) > new Date(b.start) ? -1 : 1)) } @@ -53,7 +54,7 @@ function getPrevNextMonth(monthStr: string) { } } -export default function IncidentsPage() { +export default function IncidentsPage({ monitors }: { monitors: MonitorTarget[] }) { const { t } = useTranslation('common') const [selectedMonitor, setSelectedMonitor] = useState('') const [selectedMonth, setSelectedMonth] = useState(getSelectedMonth()) @@ -64,7 +65,7 @@ export default function IncidentsPage() { return () => window.removeEventListener('hashchange', onHashChange) }, []) - const filteredIncidents = filterIncidentsByMonth(maintenances, selectedMonth) + const filteredIncidents = filterIncidentsByMonth(maintenances, selectedMonth, monitors) const monitorFilteredIncidents = selectedMonitor ? filteredIncidents.filter((i) => i.monitors.find((e) => e.id === selectedMonitor)) : filteredIncidents @@ -73,7 +74,7 @@ export default function IncidentsPage() { const monitorOptions = [ { value: '', label: t('All') }, - ...workerConfig.monitors.map((monitor) => ({ + ...monitors.map((monitor) => ({ value: monitor.id, label: monitor.name, })), @@ -131,3 +132,13 @@ export default function IncidentsPage() { ) } + +export async function getServerSideProps() { + const { workerConfig } = await import('@/uptime.config') + // Only present these values to client + const monitors: MonitorTarget[] = workerConfig.monitors.map((monitor) => ({ + id: monitor.id, + name: monitor.name, + })) as MonitorTarget[] + return { props: { monitors } } +} diff --git a/pages/index.tsx b/pages/index.tsx index b4bb800..8af1e64 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -2,7 +2,7 @@ import Head from 'next/head' import { Inter } from 'next/font/google' import { MonitorTarget } from '@/types/config' -import { maintenances, pageConfig, workerConfig } from '@/uptime.config' +import { maintenances, pageConfig } from '@/uptime.config' import OverallStatus from '@/components/OverallStatus' import Header from '@/components/Header' import MonitorList from '@/components/MonitorList' @@ -69,6 +69,7 @@ export default function Home({ } export async function getServerSideProps() { + const { workerConfig } = await import('@/uptime.config') // Read state as string from storage, to avoid hitting server-side cpu time limit const compactedStateStr = await getFromStore(process.env as any, 'state') From c8e2db258ccb964435894ff2a47e45e173c1d156 Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Thu, 5 Mar 2026 01:57:39 +0800 Subject: [PATCH 4/4] SECURITY: add advisory link for detail --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d6ba68..4676d0e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A more advanced, serverless, and free uptime monitoring & status page solution, powered by Cloudflare Workers, complete with a user-friendly interface. -📢 **[SECURITY 2026/03/04]** A vulnerability that could expose monitor configuration and credentials in `uptime.config.ts` to clients was fixed. Versions between 2025-09-21 (from commit `41257c6`) and 2026-03-04 are affected. **Affected users are strongly advised to upgrade to the latest version.** +📢 **[[SECURITY ADVISORY](https://github.com/lyc8503/UptimeFlare/security/advisories/GHSA-36q9-v7p3-vj6v) 2026/03/04]** A vulnerability (CVE-2026-29779) that could expose monitor configuration and credentials in `uptime.config.ts` to clients was fixed. Versions between 2025-09-21 (from commit `41257c6`) and 2026-03-04 are affected. **Affected users are strongly advised to upgrade to the latest version.** 🎉 **[UPDATE 2026/01/03]** I have just migrated UptimeFlare from KV to D1 Database. I also updated the Terraform Cloudflare provider to v5 and improved the deployment process. The data structure has been optimized to resolve long-standing performance issues.