X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=routes%2Fall.js;h=b9665327dab08dd76a24bfbcb5d0e38cfa586484;hb=b5fb8e693dc82037eec2617a7dc49d838a9a8441;hp=b1e0fda3096732862bdd5ecc511698f31b8388e3;hpb=86c9843cd04717d61f373ebaf3a1fdf21fd5a60f;p=vchess.git diff --git a/routes/all.js b/routes/all.js index b1e0fda3..b9665327 100644 --- a/routes/all.js +++ b/routes/all.js @@ -69,7 +69,7 @@ router.post("/problems/:variant([a-zA-Z0-9]+)", (req,res) => { const timestamp = Date.now(); // Sanitize them const fen = req.body["fen"]; - if (!fen.match(/^[a-zA-Z0-9 /]*$/)) + if (!fen.match(/^[a-zA-Z0-9, /-]*$/)) return res.json({errmsg: "Bad characters in FEN string"}); const instructions = sanitizeHtml(req.body["instructions"]); const solution = sanitizeHtml(req.body["solution"]);