aboutsummaryrefslogtreecommitdiffstats
path: root/apps/browser-extension/src/NotConfiguredPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/browser-extension/src/NotConfiguredPage.tsx')
-rw-r--r--apps/browser-extension/src/NotConfiguredPage.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/browser-extension/src/NotConfiguredPage.tsx b/apps/browser-extension/src/NotConfiguredPage.tsx
index 31d45d6a..fdda480e 100644
--- a/apps/browser-extension/src/NotConfiguredPage.tsx
+++ b/apps/browser-extension/src/NotConfiguredPage.tsx
@@ -22,6 +22,16 @@ export default function NotConfiguredPage() {
setError("Server address is required");
return;
}
+
+ // Add URL protocol validation
+ if (
+ !serverAddress.startsWith("http://") &&
+ !serverAddress.startsWith("https://")
+ ) {
+ setError("Server address must start with http:// or https://");
+ return;
+ }
+
setSettings((s) => ({ ...s, address: serverAddress.replace(/\/$/, "") }));
navigate("/signin");
};