mirror of
https://codeberg.org/ashley/poke
synced 2026-03-03 09:23:44 +00:00
add regex for vid ids
This commit is contained in:
@@ -190,6 +190,13 @@ module.exports = function (app, config, renderTemplate) {
|
||||
return res.redirect("/");
|
||||
}
|
||||
|
||||
const regex = new RegExp("^([a-zA-Z0-9_-]{11})");
|
||||
const isMatch = regex.test(v);
|
||||
|
||||
if (!isMatch) {
|
||||
return res.redirect("/");
|
||||
}
|
||||
|
||||
var contentlang = hl || "en-US";
|
||||
var contentregion = region || "US";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user