Commit 2e9e733
authored
fix(webui): keep embedded ActivityWatch URLs inside WebView (#161)
* fix(webui): keep loopback ActivityWatch URLs inside WebView
* fix(webui): fix IPv6 bracket handling and add https/no-port test coverage
java.net.URI.getHost() returns IPv6 addresses with brackets ("[::1]" not
"::1"), so the loopback check was silently misclassifying IPv6 loopback
URLs as external. Fix by matching "[::1]" directly.
Also add https loopback variants and a no-port case to the unit test to
cover the full scheme matrix the function guards.1 parent 9d32040 commit 2e9e733
2 files changed
Lines changed: 49 additions & 1 deletion
File tree
- mobile/src
- main/java/net/activitywatch/android/fragments
- test/java/net/activitywatch/android/fragments
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
27 | 47 | | |
28 | 48 | | |
29 | 49 | | |
| |||
74 | 94 | | |
75 | 95 | | |
76 | 96 | | |
77 | | - | |
| 97 | + | |
78 | 98 | | |
79 | 99 | | |
80 | 100 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments