diff --git a/pkg/static/login.html b/pkg/static/login.html
index d91201916952..3740f0a7e490 100644
--- a/pkg/static/login.html
+++ b/pkg/static/login.html
@@ -21,6 +21,14 @@
+
+
diff --git a/pkg/static/login.js b/pkg/static/login.js
index ff296bc71408..386b05ed214f 100644
--- a/pkg/static/login.js
+++ b/pkg/static/login.js
@@ -355,8 +355,16 @@ import "./login.scss";
}
}
- if (cur_machine && !environment.page.allow_multihost)
- redirect_to_current_machine();
+ if (cur_machine) {
+ if (!environment.page.allow_multihost)
+ redirect_to_current_machine();
+ else {
+ id("multihost-message").textContent = format(_("You are already connected to '$0' in this browser session. Connecting to other hosts will allow them to execute arbitrary code on each other. Please be careful."),
+ cur_machine == "." ? "localhost" : cur_machine);
+ id("multihost-get-me-there").addEventListener("click", redirect_to_current_machine);
+ show('#multihost-warning');
+ }
+ }
}
function boot() {
diff --git a/pkg/static/login.scss b/pkg/static/login.scss
index 33e664562fa9..b1fddb29d11f 100644
--- a/pkg/static/login.scss
+++ b/pkg/static/login.scss
@@ -354,14 +354,14 @@ label.checkbox {
display: none;
}
-.login-pf #banner {
+.login-pf #banner, .login-pf #multihost-warning {
margin-block: 1rem 0.5rem;
margin-inline: 0;
grid-area: banner;
inline-size: 100%;
}
-#banner-message {
+#banner-message, #multihost-message {
white-space: pre-wrap;
max-block-size: 12em;
overflow: auto;