Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix the check (protocol includes colon)

Manav Rathi622c4e7258f9
diff --git a/web/apps/accounts/src/pages/passkeys/verify.tsx b/web/apps/accounts/src/pages/passkeys/verify.tsx
index 249a3051bb..8cf1990082 100644
--- a/web/apps/accounts/src/pages/passkeys/verify.tsx
+++ b/web/apps/accounts/src/pages/passkeys/verify.tsx
@@ -169,7 +169,8 @@ const Page = () => {
export default Page;
-const isHTTP = (url: URL) => url.protocol == "http" || url.protocol == "https";
+// Not 100% accurate, but good enough for our purposes.
+const isHTTP = (url: URL) => url.protocol.startsWith("http");
const redirectToURL = (url: URL) => {
log.info(`Redirecting to ${url.href}`);