Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(remote-access): require public url before auth routing

cyh1ba193a76739
diff --git a/tests/test_ui_remote_access_auth.py b/tests/test_ui_remote_access_auth.py
index 2f0502545..3614f31c5 100644
--- a/tests/test_ui_remote_access_auth.py
+++ b/tests/test_ui_remote_access_auth.py
@@ -118,6 +118,18 @@ def test_remote_host_fails_closed_when_public_url_is_invalid(monkeypatch, tmp_pa
assert response.get_json()["error"] == "remote_access_public_url_invalid"
+def test_remote_host_fails_closed_when_public_url_is_empty(monkeypatch, tmp_path):
+ monkeypatch.setenv("VIBE_REMOTE_HOME", str(tmp_path))
+ config = _save_config(tmp_path)
+ config.remote_access.vibe_cloud.public_url = ""
+ config.save()
+
+ response = app.test_client().get("/dashboard", base_url="https://alex.avibe.bot", follow_redirects=False)
+
+ assert response.status_code == 503
+ assert response.get_json()["error"] == "remote_access_public_url_invalid"
+
+
def test_config_post_rotates_session_secret_when_remote_access_is_disabled(monkeypatch, tmp_path):
monkeypatch.setenv("VIBE_REMOTE_HOME", str(tmp_path))
config = _save_config(tmp_path)
diff --git a/vibe/ui_server.py b/vibe/ui_server.py
index 6bc3b0100..baf758900 100644
--- a/vibe/ui_server.py
+++ b/vibe/ui_server.py
@@ -226,7 +226,7 @@ def _remote_access_public_host(config: V2Config) -> str | None:
def _remote_access_public_url_invalid(config: V2Config) -> bool:
cloud = config.remote_access.vibe_cloud
- return bool(cloud.enabled and cloud.public_url and _remote_access_public_host(config) is None)
+ return bool(cloud.enabled and not _remote_access_public_host(config))
def _remote_access_snapshot(config: V2Config) -> dict[str, Any]: