mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04:00
Fix cloudflared cannot be stopped in No Auth mode due to password checking
This commit is contained in:
parent
d65abe5b8c
commit
b97019eea8
@ -63,7 +63,10 @@ module.exports.cloudflaredSocketHandler = (socket) => {
|
|||||||
socket.on(prefix + "stop", async (currentPassword, callback) => {
|
socket.on(prefix + "stop", async (currentPassword, callback) => {
|
||||||
try {
|
try {
|
||||||
checkLogin(socket);
|
checkLogin(socket);
|
||||||
await doubleCheckPassword(socket, currentPassword);
|
const disabledAuth = await setting("disableAuth");
|
||||||
|
if (!disabledAuth) {
|
||||||
|
await doubleCheckPassword(socket, currentPassword);
|
||||||
|
}
|
||||||
cloudflared.stop();
|
cloudflared.stop();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
callback({
|
callback({
|
||||||
|
@ -68,7 +68,9 @@
|
|||||||
<Confirm ref="confirmStop" btn-style="btn-danger" :yes-text="$t('Stop') + ' cloudflared'" :no-text="$t('Cancel')" @yes="stop">
|
<Confirm ref="confirmStop" btn-style="btn-danger" :yes-text="$t('Stop') + ' cloudflared'" :no-text="$t('Cancel')" @yes="stop">
|
||||||
{{ $t("The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.") }}
|
{{ $t("The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.") }}
|
||||||
|
|
||||||
<div class="mt-3">
|
<p class="mt-2">{{ $t("disableCloudflaredNoAuthMsg") }}</p>
|
||||||
|
|
||||||
|
<div v-if="!settings.disableAuth" class="mt-3">
|
||||||
<label for="current-password2" class="form-label">
|
<label for="current-password2" class="form-label">
|
||||||
{{ $t("Current Password") }}
|
{{ $t("Current Password") }}
|
||||||
</label>
|
</label>
|
||||||
@ -108,7 +110,9 @@ export default {
|
|||||||
return this.$root.cloudflared;
|
return this.$root.cloudflared;
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
settings() {
|
||||||
|
return this.$parent.$parent.$parent.settings;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
|
@ -535,4 +535,5 @@ export default {
|
|||||||
"ntfy Topic": "ntfy Topic",
|
"ntfy Topic": "ntfy Topic",
|
||||||
"Domain": "Domain",
|
"Domain": "Domain",
|
||||||
"Workstation": "Workstation",
|
"Workstation": "Workstation",
|
||||||
|
disableCloudflaredNoAuthMsg: "You are in No Auth mode, password is not require.",
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user