mirror of https://github.com/louislam/uptime-kuma
				
				
				
			Fix cloudflared cannot be stopped in No Auth mode due to password checking
							parent
							
								
									d65abe5b8c
								
							
						
					
					
						commit
						b97019eea8
					
				| 
						 | 
				
			
			@ -63,7 +63,10 @@ module.exports.cloudflaredSocketHandler = (socket) => {
 | 
			
		|||
    socket.on(prefix + "stop", async (currentPassword, callback) => {
 | 
			
		||||
        try {
 | 
			
		||||
            checkLogin(socket);
 | 
			
		||||
            await doubleCheckPassword(socket, currentPassword);
 | 
			
		||||
            const disabledAuth = await setting("disableAuth");
 | 
			
		||||
            if (!disabledAuth) {
 | 
			
		||||
                await doubleCheckPassword(socket, currentPassword);
 | 
			
		||||
            }
 | 
			
		||||
            cloudflared.stop();
 | 
			
		||||
        } catch (error) {
 | 
			
		||||
            callback({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,9 @@
 | 
			
		|||
                <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.") }}
 | 
			
		||||
 | 
			
		||||
                    <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">
 | 
			
		||||
                            {{ $t("Current Password") }}
 | 
			
		||||
                        </label>
 | 
			
		||||
| 
						 | 
				
			
			@ -108,7 +110,9 @@ export default {
 | 
			
		|||
        return this.$root.cloudflared;
 | 
			
		||||
    },
 | 
			
		||||
    computed: {
 | 
			
		||||
 | 
			
		||||
        settings() {
 | 
			
		||||
            return this.$parent.$parent.$parent.settings;
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    watch: {
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -535,4 +535,5 @@ export default {
 | 
			
		|||
    "ntfy Topic": "ntfy Topic",
 | 
			
		||||
    "Domain": "Domain",
 | 
			
		||||
    "Workstation": "Workstation",
 | 
			
		||||
    disableCloudflaredNoAuthMsg: "You are in No Auth mode, password is not require.",
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue