From d8407beb0a611d9762da7ccf47d2f9b52a7b85c7 Mon Sep 17 00:00:00 2001 From: Wes Johnson Date: Thu, 13 May 2021 15:45:37 -0400 Subject: [PATCH] fix(logging): avoid logging sensitive param values --- Libraries/ReactNative/AppRegistry.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Libraries/ReactNative/AppRegistry.js b/Libraries/ReactNative/AppRegistry.js index 0bb8a8658f7e..c2e86cf1a4d4 100644 --- a/Libraries/ReactNative/AppRegistry.js +++ b/Libraries/ReactNative/AppRegistry.js @@ -188,8 +188,10 @@ const AppRegistry = { displayMode?: number, ): void { if (appKey !== 'LogBox') { - const msg = - 'Running "' + appKey + '" with ' + JSON.stringify(appParameters); + const logParams = __DEV__ + ? '" with ' + JSON.stringify(appParameters) + : ''; + const msg = 'Running "' + appKey + logParams; infoLog(msg); BugReporting.addSource( 'AppRegistry.runApplication' + runCount++,