aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js3
-rw-r--r--src/stores/ServicesStore.js7
2 files changed, 5 insertions, 5 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 76956fdc7..a9c92fe87 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -17,6 +17,7 @@ import { readJsonSync } from 'fs-extra';
17import Store from './lib/Store'; 17import Store from './lib/Store';
18import Request from './lib/Request'; 18import Request from './lib/Request';
19import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; 19import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config';
20import { cleanseJSObject } from '../jsUtils';
20import { isMac, isWindows, electronVersion, osRelease } from '../environment'; 21import { isMac, isWindows, electronVersion, osRelease } from '../environment';
21import { ferdiumVersion, userDataPath, ferdiumLocale } from '../environment-remote'; 22import { ferdiumVersion, userDataPath, ferdiumLocale } from '../environment-remote';
22import { generatedTranslations } from '../i18n/translations'; 23import { generatedTranslations } from '../i18n/translations';
@@ -265,7 +266,7 @@ export default class AppStore extends Store {
265 } 266 }
266 267
267 @computed get debugInfo() { 268 @computed get debugInfo() {
268 const settings = JSON.parse(JSON.stringify(this.stores.settings.app)); 269 const settings = cleanseJSObject(this.stores.settings.app);
269 settings.lockedPassword = '******'; 270 settings.lockedPassword = '******';
270 271
271 return { 272 return {
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index c8042e9de..3f551eddb 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -16,6 +16,7 @@ import {
16} from '../helpers/recipe-helpers'; 16} from '../helpers/recipe-helpers';
17import { workspaceStore } from '../features/workspaces'; 17import { workspaceStore } from '../features/workspaces';
18import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config'; 18import { DEFAULT_SERVICE_SETTINGS, KEEP_WS_LOADED_USID } from '../config';
19import { cleanseJSObject } from '../jsUtils';
19import { SPELLCHECKER_LOCALES } from '../i18n/languages'; 20import { SPELLCHECKER_LOCALES } from '../i18n/languages';
20import { ferdiumVersion } from '../environment-remote'; 21import { ferdiumVersion } from '../environment-remote';
21 22
@@ -861,7 +862,7 @@ export default class ServicesStore extends Store {
861 const service = this.one(serviceId); 862 const service = this.one(serviceId);
862 863
863 // Make sure the args are clean, otherwise ElectronJS can't transmit them 864 // Make sure the args are clean, otherwise ElectronJS can't transmit them
864 const cleanArgs = JSON.parse(JSON.stringify(args)); 865 const cleanArgs = cleanseJSObject(args);
865 866
866 if (service.webview) { 867 if (service.webview) {
867 service.webview.send(channel, cleanArgs); 868 service.webview.send(channel, cleanArgs);
@@ -1273,9 +1274,7 @@ export default class ServicesStore extends Store {
1273 1274
1274 if (service.webview) { 1275 if (service.webview) {
1275 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC 1276 // We need to completely clone the object, otherwise Electron won't be able to send the object via IPC
1276 const shareWithWebview = JSON.parse( 1277 const shareWithWebview = cleanseJSObject(service.shareWithWebview);
1277 JSON.stringify(service.shareWithWebview),
1278 );
1279 1278
1280 debug('Initialize recipe', service.recipe.id, service.name); 1279 debug('Initialize recipe', service.recipe.id, service.name);
1281 service.webview.send( 1280 service.webview.send(