1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

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

This commit is contained in:
Roman 2021-08-14 21:59:54 +01:00
parent 2b6b4dd916
commit ee46978389

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