added: _ e - all'username in fase di registrazione

This commit is contained in:
paoloar77
2022-02-14 19:35:11 +01:00
parent c7d52ca531
commit a3502c1d9d
3 changed files with 22 additions and 3 deletions

View File

@@ -91,9 +91,10 @@ router.post('/', async (req, res) => {
// tools.mylog("LANG PASSATO = " + user.lang, "IDAPP", user.idapp);
if (!tools.isAlphaNumeric(body.username) || body.email.length < 6 ||
if (!tools.isAlphaNumericAndSpecialCharacter(body.username) || body.email.length < 6 ||
body.username.length < 6 || body.password.length < 6) {
await tools.snooze(5000);
console.log('Username non valido in Registrazione: ' + body.username);
res.status(400).
send({code: server_constants.RIS_CODE_USERNAME_NOT_VALID, msg: ''});
return 1;
@@ -895,7 +896,8 @@ async function eseguiDbOp(idapp, mydata, locale) {
const globalTables = require('../tools/globalTables');
const mytablesstr = ['settings', 'users', 'templemail', 'contribtypes'];
//++ Todo: TO FIXIT !
const mytablesstr = ['settings', 'users', 'templemail', 'contribtypes', 'bots', 'cfgservers'];
try {
let numrectot = 0;