From 2d7f985311a3646ed57181ef38bef47a2790a9a7 Mon Sep 17 00:00:00 2001 From: Anders Pitman Date: Sat, 17 Oct 2020 09:48:29 -0600 Subject: [PATCH] Fix Firefox silently deleted tunnels Debugging notes: * The act of refreshing a page can delete tunnels created by other UI sessions, I think because it has local CSS checkbox state. * Happens on firefox desktop and mobile. Here's how to reproduce: 1. Load the UI in Chrome and FF. 2. Delete the last tunnel from FF. 3. Add it back in Chrome. 4. Refresh FF. The tunnel will be silently deleted. * I'm pretty sure this is bugged behavior in FF, because the checkboxes have completely unique ids, but it's treating them like the same checkbox. * Setting autocomplete='off' on the input elements seems to fix the problem. Not sure if it will work correctly in all browsers. --- todo.md | 2 -- webui/index.tmpl | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/todo.md b/todo.md index 1680040..7f5c6d0 100644 --- a/todo.md +++ b/todo.md @@ -14,5 +14,3 @@ is wrong when domain stuff breaks. * Responses to unauthorized requests are leaking information about the current tunnels through the genereated CSS. -* The act of refreshing a page can delete tunnels created by other UI - sessions, I think because it has local CSS checkbox state. diff --git a/webui/index.tmpl b/webui/index.tmpl index 460ec18..ac6fe68 100644 --- a/webui/index.tmpl +++ b/webui/index.tmpl @@ -21,7 +21,7 @@
{{range $domain, $tunnel:= .Tunnels}} - +
{{$domain}}:{{$tunnel.TunnelPort}} -> {{$tunnel.ClientName}}:{{$tunnel.ClientPort}} @@ -32,7 +32,7 @@
- +