Review comments - throw an error if callback url is not valid

pull/5302/head
Roman 2021-08-14 21:59:54 +01:00
parent 2b6b4dd916
commit ee46978389
1 changed files with 1 additions and 1 deletions

View File

@ -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<string, string> = {};