mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 16:38:17 +01:00
add check for this as well :3
This commit is contained in:
parent
7f3164f74d
commit
a4930e8842
1 changed files with 3 additions and 1 deletions
|
@ -130,8 +130,10 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
|
|
||||||
if (req.params.v && /[a-zA-Z0-9]+/.test(req.params.v)) {
|
if (req.params.v && /[a-zA-Z0-9]+/.test(req.params.v)) {
|
||||||
const isvld = await core.isvalidvideo(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}`);
|
return res.redirect(`/watch?v=${req.params.v}`);
|
||||||
|
} else {
|
||||||
|
return res.redirect("/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue