1
Fork 0

add check for this as well :3

This commit is contained in:
Ashley 2023-12-24 13:02:30 +00:00
parent 7f3164f74d
commit a4930e8842

View file

@ -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("/")
}
}