backend-plus 2.5.2-betha.29 → 2.5.2-betha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/backend-plus.js +11 -16
- package/package.json +14 -14
package/lib/backend-plus.js
CHANGED
|
@@ -98,7 +98,7 @@ const bufferToBase64 = (buffer) => buffer.toString('base64');
|
|
|
98
98
|
* Función central para PBKDF2 (Acepta KEY_LEN para compatibilidad).
|
|
99
99
|
* Devuelve la clave derivada con la longitud especificada.
|
|
100
100
|
*/
|
|
101
|
-
function deriveKey(password, saltBuffer, iterations, keyLength) {
|
|
101
|
+
async function deriveKey(password, saltBuffer, iterations, keyLength) {
|
|
102
102
|
return new Promise((resolve, reject) => {
|
|
103
103
|
crypto.pbkdf2(
|
|
104
104
|
password,
|
|
@@ -1306,18 +1306,18 @@ AppBackend.prototype.start = function start(opts){
|
|
|
1306
1306
|
userInfo.bitacoraId = sessionInfo.value;
|
|
1307
1307
|
}
|
|
1308
1308
|
done(null, userInfo);
|
|
1309
|
-
client.done();
|
|
1310
1309
|
}catch(err){
|
|
1311
1310
|
if(be.config.login["double-dragon"]){
|
|
1312
1311
|
done(null,false,{message:be.messages.unlogged.login.userOrPassFail});
|
|
1313
1312
|
}
|
|
1314
|
-
if(client && typeof client.done === "function"){
|
|
1315
|
-
client.done();
|
|
1316
|
-
}
|
|
1317
1313
|
console.log('login error',err);
|
|
1318
1314
|
console.log(err.stack);
|
|
1319
1315
|
done(new Error('internal login error'));
|
|
1320
|
-
}
|
|
1316
|
+
} finally {
|
|
1317
|
+
if(client && typeof client.done === "function"){
|
|
1318
|
+
client.done();
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
1321
|
}
|
|
1322
1322
|
);
|
|
1323
1323
|
be.changePassword=async function(client,username,oldPassword,newPassword){
|
|
@@ -1368,16 +1368,11 @@ AppBackend.prototype.start = function start(opts){
|
|
|
1368
1368
|
if(be.config.login.disableChangePassword){
|
|
1369
1369
|
done(null,false,'el cambio de contraseña está deshabilitado');
|
|
1370
1370
|
}else{
|
|
1371
|
-
|
|
1372
|
-
be.inTransaction(req,function(cli){
|
|
1373
|
-
client = cli;
|
|
1371
|
+
be.inTransaction(req,function(client){
|
|
1374
1372
|
return be.changePassword(client,username,oldPassword,newPassword)
|
|
1375
1373
|
}).then(function(ok){
|
|
1376
1374
|
done(null,ok,ok?null:be.messages.server.oldPassDontMatch);
|
|
1377
1375
|
}).catch(function(err){
|
|
1378
|
-
//if(client && client.done){
|
|
1379
|
-
// client.done();
|
|
1380
|
-
//}
|
|
1381
1376
|
console.log('error changing pass',err);
|
|
1382
1377
|
console.log('stack',err.stack);
|
|
1383
1378
|
throw err;
|
|
@@ -2154,12 +2149,12 @@ AppBackend.prototype.addUnloggedServices = function addUnloggedServices(mainApp,
|
|
|
2154
2149
|
})
|
|
2155
2150
|
}
|
|
2156
2151
|
})
|
|
2152
|
+
promise.catch(err=>{
|
|
2153
|
+
console.log('error in /new-password');
|
|
2154
|
+
console.log(err);
|
|
2155
|
+
})
|
|
2157
2156
|
}
|
|
2158
2157
|
res.redirect(Path.posix.join(baseUrl, be.config.login.forget?.urlPathOk+'?result'+resultCode));
|
|
2159
|
-
promise.catch(err=>{
|
|
2160
|
-
console.log('error in /new-password');
|
|
2161
|
-
console.log(err);
|
|
2162
|
-
})
|
|
2163
2158
|
})
|
|
2164
2159
|
mainApp.get(Path.posix.join(baseUrl,'/new-pass'), function(req,res,next){
|
|
2165
2160
|
var resultCode;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backend-plus",
|
|
3
3
|
"description": "Backend for the anti Pareto rule",
|
|
4
|
-
"version": "2.5.2-betha.
|
|
4
|
+
"version": "2.5.2-betha.31",
|
|
5
5
|
"author": "Codenautas <codenautas@googlegroups.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "codenautas/backend-plus",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@upgraded/locate-path": "^6.0.0-alfa.1",
|
|
33
33
|
"ajax-best-promise": "^0.4.2",
|
|
34
34
|
"backend-skins": "^0.1.15",
|
|
35
|
-
"best-globals": "^2.0.
|
|
35
|
+
"best-globals": "^2.0.2",
|
|
36
36
|
"big.js": "^7.0.1",
|
|
37
37
|
"body-parser": "^2.2.0",
|
|
38
38
|
"cast-error": "^0.1.2",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"discrepances": "^0.2.9",
|
|
45
45
|
"express": "^5.1.0",
|
|
46
46
|
"express-session": "^1.18.2",
|
|
47
|
-
"express-useragent": "^
|
|
48
|
-
"fs-extra": "^11.3.
|
|
47
|
+
"express-useragent": "^2.0.2",
|
|
48
|
+
"fs-extra": "^11.3.2",
|
|
49
49
|
"js-to-html": "^1.3.2",
|
|
50
|
-
"js-yaml": "^4.1.
|
|
50
|
+
"js-yaml": "^4.1.1",
|
|
51
51
|
"json4all": "^1.4.0",
|
|
52
52
|
"lazy-some": "^0.1.0",
|
|
53
53
|
"like-ar": "^0.5.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"mini-tools": "^1.13.4",
|
|
57
57
|
"moment": "^2.30.1",
|
|
58
58
|
"multiparty": "^4.2.3",
|
|
59
|
-
"nodemailer": "^7.0.
|
|
59
|
+
"nodemailer": "^7.0.10",
|
|
60
60
|
"numeral": "^2.0.6",
|
|
61
61
|
"pg-promise-strict": "^1.4.3",
|
|
62
62
|
"pg-triggers": "0.4.3",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"self-explain": "^0.11.0",
|
|
69
69
|
"serve-content": "^1.0.2",
|
|
70
70
|
"session-file-store": "^1.5.0",
|
|
71
|
-
"simple-git": "^3.
|
|
71
|
+
"simple-git": "^3.30.0",
|
|
72
72
|
"sql-tools": "^0.1.2",
|
|
73
73
|
"stack-trace": "^0.0.10",
|
|
74
74
|
"stylus": "0.64.0",
|
|
@@ -79,16 +79,16 @@
|
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/big.js": "^6.2.2",
|
|
81
81
|
"@types/expect.js": "~0.3.32",
|
|
82
|
-
"@types/express": "^5.0.
|
|
82
|
+
"@types/express": "^5.0.5",
|
|
83
83
|
"@types/express-useragent": "^1.0.5",
|
|
84
84
|
"@types/fs-extra": "^11.0.4",
|
|
85
85
|
"@types/js-yaml": "^4.0.9",
|
|
86
86
|
"@types/mocha": "^10.0.10",
|
|
87
87
|
"@types/multiparty": "~4.2.1",
|
|
88
|
-
"@types/node": "^24.
|
|
89
|
-
"@types/nodemailer": "^7.0.
|
|
88
|
+
"@types/node": "^24.10.1",
|
|
89
|
+
"@types/nodemailer": "^7.0.4",
|
|
90
90
|
"@types/numeral": "~2.0.5",
|
|
91
|
-
"@types/session-file-store": "^1.2.
|
|
91
|
+
"@types/session-file-store": "^1.2.6",
|
|
92
92
|
"@types/stack-trace": "~0.0.33",
|
|
93
93
|
"@types/websql": "~0.0.30",
|
|
94
94
|
"esprima": "^4.0.1",
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
"karma-ie-launcher": "^1.0.0",
|
|
101
101
|
"karma-mocha": "^2.0.1",
|
|
102
102
|
"kill-9": "~0.4.3",
|
|
103
|
-
"mocha": "^11.7.
|
|
103
|
+
"mocha": "^11.7.5",
|
|
104
104
|
"nyc": "^17.1.0",
|
|
105
|
-
"puppeteer": "^24.
|
|
105
|
+
"puppeteer": "^24.31.0",
|
|
106
106
|
"sinon": "^21.0.0",
|
|
107
107
|
"supertest": "^7.1.4",
|
|
108
108
|
"types.d.ts": "~0.6.22",
|
|
109
|
-
"typescript": "^5.9.
|
|
109
|
+
"typescript": "^5.9.3",
|
|
110
110
|
"why-is-node-running": "^3.2.2"
|
|
111
111
|
},
|
|
112
112
|
"engines": {
|