- mappa iniziale

- fix PATCH /chval Json Injections: era possibile cambiare la password !
- ogni giorno sblocca la lista di chi chiede troppe richieste di recupero password.
This commit is contained in:
Surya Paolo
2024-03-21 21:22:57 +01:00
parent 3e0d0bf018
commit bd95e4457f
6 changed files with 77 additions and 21 deletions

View File

@@ -3765,14 +3765,23 @@ module.exports = {
return mystr.replace(/\s+/g, '');
},
ModificheConsentite(table, fieldsvalue, idrec, user) {
ModificheConsentite(req, table, fieldsvalue, idrec, user) {
if (table === 'sharewithus') {
return true;
}
if (table === 'hours') {
return true;
}
if (table === 'users') {
if (idrec && (req.user._id.toString() === idrec)) {
if (Object.keys(fieldsvalue).some(key => key.startsWith('profile.'))) {
return true;
}
if (Object.keys(fieldsvalue).some(key => server_constants.User_Fields.includes(key))) {
return true;
}
}
if ('aportador_solidario' in fieldsvalue) {
return true;
}
@@ -4891,7 +4900,7 @@ module.exports = {
// console.log(`${city.descr}: Lat ${city.lat}, Long ${city.long}`);
return city;
} else {
console.error(`Coordinate non trovate per ${city.descr}, ${city.prov}`);
console.error(`Coordinate non trovate per ${city.descr}, ${city.prov}`);
}
return null;
} catch (error) {