add regex lol

This commit is contained in:
Ashley 2022-12-18 11:56:33 +00:00
parent 4e9411f0d7
commit abd5b68a28

View file

@ -77,6 +77,7 @@ module.exports = function (app, config, renderTemplate) {
};
if (req.params.v) {
if (/[a-zA-Z0-9]+/.test(req.param.v)) {
const isvld = await core.isvalidvideo(req.params.v);
if (isvld) {
@ -84,6 +85,7 @@ module.exports = function (app, config, renderTemplate) {
} else {
return rendermainpage();
}
}
} else {
return rendermainpage();
}