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:
parent
2b6b4dd916
commit
ee46978389
@ -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> = {};
|
||||
|
Loading…
Reference in New Issue
Block a user