fix(client): validate urls to improve security
This commit is contained in:
parent
2dfed75402
commit
38f9d1e764
4 changed files with 19 additions and 2 deletions
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
<div class="poamfof">
|
||||
<Transition :name="$store.state.animation ? 'fade' : ''" mode="out-in">
|
||||
<div v-if="player.url" class="player">
|
||||
<div v-if="player.url && (player.url.startsWith('http://') || player.url.startsWith('https://'))" class="player">
|
||||
<iframe v-if="!fetching" :src="player.url + (player.url.match(/\?/) ? '&autoplay=1&auto_play=1' : '?autoplay=1&auto_play=1')" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen/>
|
||||
</div>
|
||||
<span v-else>invalid url</span>
|
||||
</Transition>
|
||||
<MkLoading v-if="fetching"/>
|
||||
<MkError v-else-if="!player.url" @retry="ytFetch()"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue