From d743aa39f3ddaf5e3f1d5f40e2a3ec9eb90cfc4d Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 5 Aug 2016 14:05:24 -0400 Subject: #293 - logs now won't have password stored, and userProfile is cryptoJS ciphered Former-commit-id: 0db06364a3532cbbb31bd5fa33a488b232f725a5 --- www/js/app.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'www/js/app.js') diff --git a/www/js/app.js b/www/js/app.js index 2cd9422c..e776d18c 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1,6 +1,6 @@ /* jshint -W041 */ /* jslint browser: true*/ -/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, localforage,$*/ +/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, CryptoJS, localforage,$*/ var appVersion = "0.0.0"; @@ -78,11 +78,10 @@ angular.module('zmApp', [ eventHistoryTimer: 10000, eventPlaybackQuery: 3000, packeryTimer: 500, - dbName: 'zmninja' + dbName: 'zmninja', + cipherKey: 'sdf#@#%FSXSA_AR' - - }) @@ -1085,6 +1084,11 @@ angular.module('zmApp', [ //--------------------------------------------------------------------- $ionicPlatform.ready(function () { + + + + + $rootScope.db = null; @@ -1176,7 +1180,9 @@ angular.module('zmApp', [ }) .then (function() { ZMDataModel.zmLog (">>>>migrated latestBlogPostChecked..."); - return localforage.setItem('serverGroupList', sgl); + // lets encrypt serverGroupList + var ct = CryptoJS.AES.encrypt(JSON.stringify(sgl), zm.cipherKey); + return localforage.setItem('serverGroupList', ct); }) .then (function() { ZMDataModel.zmLog (">>>>migrated serverGroupList..."); -- cgit v1.2.3