mirror of
https://github.com/TeamPiped/Piped.git
synced 2025-08-09 20:24:09 +00:00
Fix severe vulnerability in case of a malicious Piped/YouTube server.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<div v-if="channel" v-show="!channel.error">
|
||||
<h1 class="uk-text-center"><img height="48" width="48" v-bind:src="channel.avatarUrl" />{{ channel.name }}</h1>
|
||||
<img v-if="channel.bannerUrl" v-bind:src="channel.bannerUrl" style="width: 100%" loading="lazy" />
|
||||
<p v-html="this.channel.description" style="white-space: pre"></p>
|
||||
<p v-html="purifyHTML(this.channel.description)" style="white-space: pre"></p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="uk-container uk-container-xlarge">
|
||||
<ErrorHandler v-if="video.error" :message="video.message" :error="video.error" />
|
||||
<ErrorHandler v-if="video && video.error" :message="video.message" :error="video.error" />
|
||||
|
||||
<div v-show="!video.error">
|
||||
<Player ref="videoPlayer" :video="video" :sponsors="sponsors" :selectedAutoPlay="selectedAutoPlay" />
|
||||
@@ -169,10 +169,12 @@ export default {
|
||||
if (!this.video.error) {
|
||||
document.title = this.video.title + " - Piped";
|
||||
|
||||
this.video.description = this.video.description
|
||||
.replaceAll("http://www.youtube.com", "")
|
||||
.replaceAll("https://www.youtube.com", "")
|
||||
.replaceAll("\n", "<br>");
|
||||
this.video.description = this.purifyHTML(
|
||||
this.video.description
|
||||
.replaceAll("http://www.youtube.com", "")
|
||||
.replaceAll("https://www.youtube.com", "")
|
||||
.replaceAll("\n", "<br>"),
|
||||
);
|
||||
|
||||
this.$refs.videoPlayer.loadVideo();
|
||||
}
|
||||
|
Reference in New Issue
Block a user