From 0621eb0670a1fbc950e24d18212adc31ff5cc573 Mon Sep 17 00:00:00 2001 From: Alireza Ahmadi Date: Mon, 19 Feb 2024 23:04:20 +0100 Subject: [PATCH] settings security alert --- web/html/xui/settings.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/web/html/xui/settings.html b/web/html/xui/settings.html index fab91f2b..086ad792 100644 --- a/web/html/xui/settings.html +++ b/web/html/xui/settings.html @@ -51,6 +51,16 @@ show-icon closable > + + + @@ -310,6 +320,20 @@ } } }, + computed: { + confAlerts: { + get: function() { + if (!this.allSetting) return []; + var alerts = [] + if (this.allSetting.port == 54321) alerts.push('{{ i18n "pages.settings.panelPort"}}'); + panelPath = window.location.pathname.split('/').length<4 + if (panelPath && this.allSetting.webBasePath == '/') alerts.push('{{ i18n "pages.settings.panelConfig"}} {{ i18n "pages.settings.panelUrlPath"}}'); + subPath = this.allSetting.subURI.length >0 ? new URL(this.allSetting.subURI).pathname : this.allSetting.subPath; + if (subPath == '/sub/') alerts.push('{{ i18n "pages.settings.subSettings"}} {{ i18n "pages.settings.subPath"}}'); + return alerts + } + } + }, async mounted() { if (window.location.protocol !== "https:") { this.showAlert = true;