fix(client): validate urls to improve security
This commit is contained in:
parent
572000f868
commit
788ae2f6ca
4 changed files with 4 additions and 0 deletions
|
@ -33,6 +33,7 @@ const props = defineProps<{
|
|||
|
||||
const self = props.url.startsWith(local);
|
||||
const url = new URL(props.url);
|
||||
if (!['http:', 'https:'].includes(url.protocol)) throw new Error('invalid url');
|
||||
const el = ref();
|
||||
|
||||
useTooltip(el, (showing) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue