Skip to content

Commit 69d8ab3

Browse files
Staging (#276)
* increase poolSize for mongoclient * mongodb conn string * remove certs * Encryption (#272) * Import Data * Import Data * Import Data * Import API Update * Import API Fix * Update * Updates Import API * Updates Import API * Updates Import API * Import API Update * Update * Import API Update * Import API Update * chaging rolling update to api * Import API Fix * Import API Fix * Import API Test * Import API Test * Import API Fix * Update README.md * Import Export API * Import Export API (#262) * Import Export API * Import API * Import Export API (#263) * Import Export API * Import Export API * Import API * fixed realTime for multiple tables on a single client * added cache-control for app-icon images (#269) * Update README.md * added cache-control for app-icon images * Encryption * Encryption * Encryption * Resolve * Encryption Changes * Encryption Changes
1 parent c2eb72c commit 69d8ab3

File tree

8 files changed

+253
-5943
lines changed

8 files changed

+253
-5943
lines changed

api/app/App.js

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports = function () {
2626

2727
global.appService.createDefaultTables(appId).then(function () {
2828
console.log("Success : App Successfully Created.");
29+
delete app.keys.encryption_key;
2930
res.status(200).send(app);
3031
}, function (err) {
3132
console.log("Error : Cannot create an app.");

api/pages/Page.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ module.exports = function() {
3333

3434
appKeys.masterKey=list[0].keys.master;
3535
var appSettingsObject=list[1];
36+
list[0].keys.encryption_key ? delete list[0].keys.encryption_key : null;
3637

3738
var general=_.first(_.where(appSettingsObject, {category: "general"}));
3839
var auth=_.first(_.where(appSettingsObject, {category: "auth"}));
@@ -75,13 +76,15 @@ module.exports = function() {
7576
"message": "New Password is required."
7677
});
7778
}
78-
79-
global.userService.resetUserPassword(appId, username, newPassword, resetKey, customHelper.getAccessList(req), true)
80-
.then(function(result) {
81-
res.json({message : "Password changed successfully."});
82-
}, function(error) {
83-
res.json(400, {
84-
error: error
79+
80+
global.appService.getApp(appId).then(function (application) {
81+
global.userService.resetUserPassword(appId, username, newPassword, resetKey, customHelper.getAccessList(req), true, application.keys.encryption_key)
82+
.then(function(result) {
83+
res.json({message : "Password changed successfully."});
84+
}, function(error) {
85+
res.json(400, {
86+
error: error
87+
});
8588
});
8689
});
8790

0 commit comments

Comments
 (0)