1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 01:34:43 -05:00

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