mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 16:58:14 +01:00
add regex lol
This commit is contained in:
parent
4e9411f0d7
commit
abd5b68a28
1 changed files with 7 additions and 5 deletions
|
@ -77,6 +77,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (req.params.v) {
|
if (req.params.v) {
|
||||||
|
if (/[a-zA-Z0-9]+/.test(req.param.v)) {
|
||||||
const isvld = await core.isvalidvideo(req.params.v);
|
const isvld = await core.isvalidvideo(req.params.v);
|
||||||
|
|
||||||
if (isvld) {
|
if (isvld) {
|
||||||
|
@ -84,6 +85,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
} else {
|
} else {
|
||||||
return rendermainpage();
|
return rendermainpage();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return rendermainpage();
|
return rendermainpage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue