From a4930e88427b100bf2218b726ce98fdf15e85cb7 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 24 Dec 2023 13:02:30 +0000 Subject: [PATCH] add check for this as well :3 --- src/libpoketube/init/pages-404-and-main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libpoketube/init/pages-404-and-main.js b/src/libpoketube/init/pages-404-and-main.js index 783cae32..66b0ea9c 100644 --- a/src/libpoketube/init/pages-404-and-main.js +++ b/src/libpoketube/init/pages-404-and-main.js @@ -130,8 +130,10 @@ module.exports = function (app, config, renderTemplate) { if (req.params.v && /[a-zA-Z0-9]+/.test(req.params.v)) { const isvld = await core.isvalidvideo(req.params.v); - if (isvld) { + if (isvld && req.params.v.length >= 10) { return res.redirect(`/watch?v=${req.params.v}`); + } else { + return res.redirect("/") } }