From ee46978389fa7d070dca476b3d737137b2486b6f Mon Sep 17 00:00:00 2001 From: Roman Date: Sat, 14 Aug 2021 21:59:54 +0100 Subject: [PATCH] Review comments - throw an error if callback url is not valid --- packages/lib/ProtocolUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/ProtocolUtils.ts b/packages/lib/ProtocolUtils.ts index 65549e8c1..4e361d211 100644 --- a/packages/lib/ProtocolUtils.ts +++ b/packages/lib/ProtocolUtils.ts @@ -22,7 +22,7 @@ export interface CallbackUrlInfo { } export function parseUrl(s: string): CallbackUrlInfo { - if (!s.startsWith('joplin://')) return null; + if (!isCallbackUrl(s)) throw new Error(`Invalid callback url ${s}`); const url = new URL(s); const params: Record = {};