From 1aab4f03ca56f728732d5519aa526887e6dcb94d Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Wed, 4 Sep 2024 15:59:04 +0200 Subject: [PATCH] Improve redacting --- patches/react-native+0.75.2+016+hybrid-app.patch | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/patches/react-native+0.75.2+016+hybrid-app.patch b/patches/react-native+0.75.2+016+hybrid-app.patch index 8ba33f01b7d7..2279b49856c5 100644 --- a/patches/react-native+0.75.2+016+hybrid-app.patch +++ b/patches/react-native+0.75.2+016+hybrid-app.patch @@ -1,7 +1,6 @@ diff --git a/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 -index 0000000..a403fbb -Binary files /dev/null and b/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ +index 0000000..e69de29 diff --git a/node_modules/react-native/.gradle/buildOutputCleanup/cache.properties b/node_modules/react-native/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..17fb517 @@ -45,10 +44,10 @@ index 0000000..dacc2de + + diff --git a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js -index 68bd389..4d1925e 100644 +index 68bd389..f99894d 100644 --- a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js +++ b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js -@@ -232,12 +232,31 @@ const AppRegistry = { +@@ -232,12 +232,34 @@ const AppRegistry = { appParameters: Object, displayMode?: number, ): void { @@ -67,7 +66,10 @@ index 68bd389..4d1925e 100644 + return parameters; + } + -+ const redactedSearchParams = [...new URLSearchParams(queryString).entries()].map(([key, value]) => `${key}=${sensitiveParams.includes(key) ? '' : value}`); ++ const redactedSearchParams = queryString.split('&').map((param) => { ++ const [key, value] = param.split('='); ++ return `${key}=${sensitiveParams.includes(key) ? '' : value}` ++ }); + return {...parameters, initialProps: {...initialProps, url: `${urlBase}?${redactedSearchParams.join('&')}`}}; + } +