Merge branch 'develop'

indiachan-spamvector v0.9.2
Thomas Lynch 2 years ago
commit 91a842e43b
Signed by: fatchan
GPG Key ID: 112884AA57DF40B1
  1. 3
      CHANGELOG.md
  2. 2
      lib/middleware/captcha/blockbypass.js
  3. 2
      models/forms/blockbypass.js
  4. 4
      package-lock.json
  5. 2
      package.json

@ -1,3 +1,6 @@
### 0.9.2
- Bugfix an issue with bypasses/captcha related to difference between renewing vs getting new bypass.
### 0.9.1
- Allow customisable font for grid captcha.
- Default grid captcha to a common system font instead of bundling an enormous 24MB font file.

@ -55,7 +55,7 @@ module.exports = {
if (res.locals.solvedCaptcha) {
//they dont have a valid bypass, but just solved board captcha, so give them a new one
const newBypass = await Bypass.getBypass(res.locals.anonymizer, res.locals.pseudoIp, blockBypass.expireAfterUses);
const newBypassId = newBypass.insertedId;
const newBypassId = newBypass.upsertedId || newBypass.insertedId || res.locals.pseudoIp;
res.locals.blockBypass = true;
res.cookie('bypassid', newBypassId.toString(), {
'maxAge': blockBypass.expireAfterTime,

@ -10,7 +10,7 @@ module.exports = async (req, res) => {
const { secureCookies, blockBypass } = config.get;
const existingBypassId = req.signedCookies.bypassid || res.locals.pseudoIp;
const bypass = await Bypass.getBypass(res.locals.anonymizer, existingBypassId, blockBypass.expireAfterUses);
const bypassId = bypass.insertedId || existingBypassId; // if upserted, insertedId will be null, and will be the existingId
const bypassId = bypass.upsertedId || bypass.insertedId || existingBypassId;
res.locals.blockBypass = true;
res.cookie('bypassid', bypassId.toString(), {

4
package-lock.json generated

@ -1,12 +1,12 @@
{
"name": "jschan",
"version": "0.9.1",
"version": "0.9.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "jschan",
"version": "0.9.1",
"version": "0.9.2",
"license": "AGPL-3.0-only",
"dependencies": {
"@fatchan/express-fileupload": "^1.4.2",

@ -1,6 +1,6 @@
{
"name": "jschan",
"version": "0.9.1",
"version": "0.9.2",
"migrateVersion": "0.9.1",
"description": "",
"main": "server.js",

Loading…
Cancel
Save