security alert without tls

This commit is contained in:
Alireza Ahmadi
2023-08-01 01:17:09 +02:00
parent bca0f63239
commit 3528135297
7 changed files with 46 additions and 4 deletions

View File

@@ -20,9 +20,13 @@
<a-layout-content>
<a-spin :spinning="spinning" :delay="500" tip="loading">
<transition name="list" appear>
<a-tag v-if="false" color="red" style="margin-bottom: 10px">
Please go to the panel settings as soon as possible to modify the username and password, otherwise there may be a risk of leaking account information
</a-tag>
<a-alert type="error" v-if="showAlert" style="margin-bottom: 10px"
message='{{ i18n "secAlertTitle" }}'
color="red"
description='{{ i18n "secAlertSsl" }}'
show-icon closable
>
</a-alert>
</transition>
<transition name="list" appear>
<a-card hoverable style="margin-bottom: 20px;" :class="themeSwitcher.darkCardClass">
@@ -366,7 +370,8 @@
domain: '',
tls: false
},
tgBotEnable: false
tgBotEnable: false,
showAlert: false,
},
methods: {
loading(spinning = true) {
@@ -952,6 +957,9 @@
}, 500)
},
mounted() {
if (window.location.protocol !== "https:") {
this.showAlert = true;
}
this.loading();
this.getDefaultSettings();
if (this.isRefreshEnabled) {

View File

@@ -22,6 +22,15 @@
<a-layout id="content-layout" :style="themeSwitcher.bgStyle">
<a-layout-content>
<a-spin :spinning="spinning" :delay="200" :tip="loadingTip"/>
<transition name="list" appear>
<a-alert type="error" v-if="showAlert" style="margin-bottom: 10px"
message='{{ i18n "secAlertTitle" }}'
color="red"
description='{{ i18n "secAlertSsl" }}'
show-icon closable
>
</a-alert>
</transition>
<transition name="list" appear>
<a-row>
<a-card hoverable :class="themeSwitcher.darkCardClass">
@@ -409,6 +418,7 @@
backupModal,
spinning: false,
loadingTip: '{{ i18n "loading"}}',
showAlert: false,
},
methods: {
loading(spinning, tip = '{{ i18n "loading"}}') {
@@ -527,6 +537,9 @@
},
},
async mounted() {
if (window.location.protocol !== "https:") {
this.showAlert = true;
}
while (true) {
try {
await this.getStatus();

View File

@@ -52,6 +52,15 @@
<a-layout id="content-layout" :style="themeSwitcher.bgStyle">
<a-layout-content>
<a-spin :spinning="spinning" :delay="500" tip="loading">
<transition name="list" appear>
<a-alert type="error" v-if="showAlert" style="margin-bottom: 10px"
message='{{ i18n "secAlertTitle" }}'
color="red"
description='{{ i18n "secAlertSsl" }}'
show-icon closable
>
</a-alert>
</transition>
<a-space direction="vertical">
<a-space direction="horizontal">
<a-button type="primary" :disabled="saveBtnDisable" @click="updateAllSetting">{{ i18n "pages.settings.save" }}</a-button>
@@ -362,6 +371,7 @@
saveBtnDisable: true,
user: {},
lang: getLang(),
showAlert: false,
ipv4Settings: {
tag: "IPv4",
protocol: "freedom",
@@ -550,6 +560,9 @@
}
},
async mounted() {
if (window.location.protocol !== "https:") {
this.showAlert = true;
}
await this.getAllSetting();
while (true) {
await PromiseUtil.sleep(1000);

View File

@@ -48,6 +48,8 @@
"clients" = "Clients"
"usage" = "Usage"
"remained" = "Remained"
"secAlertTitle" = "Security Alert"
"secAlertSsl" = "This connection is not secure; Please refrain from entering sensitive information until TLS is activated for data protection"
[menu]
"dashboard" = "System Status"

View File

@@ -48,6 +48,8 @@
"clients" = "کاربران"
"usage" = "استفاده"
"remained" = "باقیمانده"
"secAlertTitle" = "هشدار امنیتی"
"secAlertSsl" = "این اتصال امن نیست؛ لطفا تا زمانی که تی‌ال‌اس برای حفاظت از داده ها فعال نشده است از وارد کردن اطلاعات حساس خودداری کنید"
[menu]
"dashboard" = "وضعیت سیستم"

View File

@@ -48,6 +48,8 @@
"clients" = "клиенты"
"usage" = "использование"
"remained" = "остались"
"secAlertTitle" = "Предупреждение системы безопасности"
"secAlertSsl" = "Это соединение не защищено. Пожалуйста, воздержитесь от ввода конфиденциальной информации, пока TLS не будет активирован для защиты данных"
[menu]
"dashboard" = "статус системы"

View File

@@ -48,6 +48,8 @@
"clients" = "客户端"
"usage" = "用法"
"remained" = "仍然存在"
"secAlertTitle" = "安全警报"
"secAlertSsl" = "此连接不安全;在激活 TLS 进行数据保护之前,请勿输入敏感信息"
[menu]
"dashboard" = "系统状态"