diff options
author | gumi <git@gumi.ca> | 2018-04-10 19:15:13 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2018-04-10 19:15:13 -0400 |
commit | 8fc40ae5e1400b4e7a3d4f05105742afd2c68854 (patch) | |
tree | 70ab199f1e7742608fd3bea826520c9ae83ed4fe | |
parent | a944a52e264febae95626ff20c8a3ed89e3d6e9c (diff) | |
download | apiv1-8fc40ae5e1400b4e7a3d4f05105742afd2c68854.tar.gz apiv1-8fc40ae5e1400b4e7a3d4f05105742afd2c68854.tar.bz2 apiv1-8fc40ae5e1400b4e7a3d4f05105742afd2c68854.tar.xz apiv1-8fc40ae5e1400b4e7a3d4f05105742afd2c68854.zip |
...it turns out tokens can be quite long
-rw-r--r-- | src/api.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -36,7 +36,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-_]{30,60}$/)) { + if (!token.match(/^[a-zA-Z0-9-_]{20,800}$/)) { res.status(403).json({ status: "error", error: "no token sent" |