aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/lib/client-html.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 2fcf0c4ea..e59505614 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -37,6 +37,7 @@ export class ClientHtml {
37 static async getWatchHTMLPage (videoId: string, req: express.Request, res: express.Response) { 37 static async getWatchHTMLPage (videoId: string, req: express.Request, res: express.Response) {
38 // Let Angular application handle errors 38 // Let Angular application handle errors
39 if (!validator.isInt(videoId) && !validator.isUUID(videoId, 4)) { 39 if (!validator.isInt(videoId) && !validator.isUUID(videoId, 4)) {
40 res.status(404)
40 return ClientHtml.getIndexHTML(req, res) 41 return ClientHtml.getIndexHTML(req, res)
41 } 42 }
42 43
@@ -47,7 +48,8 @@ export class ClientHtml {
47 48
48 // Let Angular application handle errors 49 // Let Angular application handle errors
49 if (!video || video.privacy === VideoPrivacy.PRIVATE || video.privacy === VideoPrivacy.INTERNAL || video.VideoBlacklist) { 50 if (!video || video.privacy === VideoPrivacy.PRIVATE || video.privacy === VideoPrivacy.INTERNAL || video.VideoBlacklist) {
50 return ClientHtml.getIndexHTML(req, res) 51 res.status(404)
52 return html
51 } 53 }
52 54
53 let customHtml = ClientHtml.addTitleTag(html, escapeHTML(video.name)) 55 let customHtml = ClientHtml.addTitleTag(html, escapeHTML(video.name))
@@ -77,6 +79,7 @@ export class ClientHtml {
77 79
78 // Let Angular application handle errors 80 // Let Angular application handle errors
79 if (!entity) { 81 if (!entity) {
82 res.status(404)
80 return ClientHtml.getIndexHTML(req, res) 83 return ClientHtml.getIndexHTML(req, res)
81 } 84 }
82 85