diff options
author | gumi <git@gumi.ca> | 2018-04-10 15:12:52 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-04-10 15:12:52 -0400 |
commit | f6f78df611b1e94e079e4c023ea610a3b4bebac8 (patch) | |
tree | 315cf5a831e53792a4203811f6ceebd1ef49241b | |
parent | 429b055c829f11d9d019910823eb7fe8d5f1e74f (diff) | |
download | apiv1-f6f78df611b1e94e079e4c023ea610a3b4bebac8.tar.gz apiv1-f6f78df611b1e94e079e4c023ea610a3b4bebac8.tar.bz2 apiv1-f6f78df611b1e94e079e4c023ea610a3b4bebac8.tar.xz apiv1-f6f78df611b1e94e079e4c023ea610a3b4bebac8.zip |
cap the captcha token length
-rw-r--r-- | server.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -59,7 +59,7 @@ const checkRateLimiting = (req, res, next) => { const checkCaptcha = (req, res, next) => { const token = String(req.get("X-CAPTCHA-TOKEN")); - if (!token.match(/^[a-zA-Z0-9-_]{8,}$/)) { + if (!token.match(/^[a-zA-Z0-9-_]{30,60}$/)) { res.status(403).json({ status: "error", error: "no token sent" |