- MultiDominio: api.riso.app, api.gruppomacro.app
This commit is contained in:
@@ -721,11 +721,14 @@ router.post('/login', checkBlocked, (req, res) => {
|
||||
failedLoginAttempts[body.username]++;
|
||||
}
|
||||
|
||||
let numvolteerrati = failedLoginAttempts[body.username];
|
||||
|
||||
const msg = 'Tentativo (' + failedLoginAttempts[body.username] + ') di Login ERRATO [' + body.username + ' , ' + ']\n' + '[IP: ' + tools.getiPAddressUser(req) + ']';
|
||||
tools.mylogshow(msg);
|
||||
await telegrambot.sendMsgTelegramToTheAdmin(myuser.idapp, msg, true);
|
||||
tools.writeErrorLog(msg);
|
||||
if (numvolteerrati > 2) {
|
||||
const msg = 'Tentativo (' + numvolteerrati + ') di Login ERRATO [' + body.username + ' , ' + ']\n' + '[IP: ' + tools.getiPAddressUser(req) + ']';
|
||||
tools.mylogshow(msg);
|
||||
await telegrambot.sendMsgTelegramToTheAdmin(myuser.idapp, msg, true);
|
||||
tools.writeErrorLog(msg);
|
||||
}
|
||||
// telegrambot.sendMsgTelegramToTheManagers(body.idapp, msg);
|
||||
|
||||
if (failedLoginAttempts[body.username] >= MAX_FAILED_ATTEMPTS) {
|
||||
@@ -1623,7 +1626,7 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
await Circuit.createCircuitIfNotExist(req, idapp, recprov.prov);
|
||||
}
|
||||
|
||||
} else if (mydata.dbop === 'correggiProductTypes') {
|
||||
} else if (mydata.dbop === 'correggiProductTypes') {
|
||||
|
||||
await ProductInfo.correggiProductTypes();
|
||||
|
||||
@@ -1634,7 +1637,7 @@ async function eseguiDbOp(idapp, mydata, locale, req, res) {
|
||||
{},
|
||||
{ $pull: { "profile.mycircuits": { "circuitname": null } } }
|
||||
);
|
||||
|
||||
|
||||
} else if (mydata.dbop === 'ImpostaMinMaxPersonali') {
|
||||
|
||||
await Account.SetMinMaxPersonali(idapp, mydata.valmin, mydata.valmax, '');
|
||||
|
||||
Reference in New Issue
Block a user