Added 'altcha' captcha system for account and channel creation.
This commit is contained in:
parent
60801f0dc2
commit
e0f53df176
20 changed files with 326 additions and 55 deletions
|
|
@ -21,7 +21,7 @@ const { check, body, checkSchema, checkExact} = require('express-validator');
|
|||
const {isRank} = require('./permissionsValidator');
|
||||
|
||||
module.exports = {
|
||||
user: (field = 'user') => check(field).escape().trim().isLength({min: 1, max: 22}),
|
||||
user: (field = 'user') => check(field).escape().trim().isAlphanumeric().isLength({min: 1, max: 22}),
|
||||
|
||||
//Password security requirements may change over time, therefore we should only validate against strongPassword() when creating new accounts
|
||||
//that way we don't break old ones upon change
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const { check, body, checkSchema, checkExact} = require('express-validator');
|
|||
const accountValidator = require('./accountValidator');
|
||||
|
||||
module.exports = {
|
||||
name: (field = 'name') => check(field).escape().trim().isLength({min: 1, max: 50}),
|
||||
name: (field = 'name') => check(field).escape().trim().isAlphanumeric().isLength({min: 1, max: 50}),
|
||||
|
||||
description: (field = 'description') => body(field).escape().trim().isLength({min: 1, max: 1000}),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue