Skip to content

Commit 1aab4f0

Browse files
committed
Improve redacting
1 parent 6ecbb5e commit 1aab4f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

patches/react-native+0.75.2+016+hybrid-app.patch

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
diff --git a/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock
22
new file mode 100644
3-
index 0000000..a403fbb
4-
Binary files /dev/null and b/node_modules/react-native/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
3+
index 0000000..e69de29
54
diff --git a/node_modules/react-native/.gradle/buildOutputCleanup/cache.properties b/node_modules/react-native/.gradle/buildOutputCleanup/cache.properties
65
new file mode 100644
76
index 0000000..17fb517
@@ -45,10 +44,10 @@ index 0000000..dacc2de
4544
+ </filteredResources>
4645
+</projectDescription>
4746
diff --git a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js
48-
index 68bd389..4d1925e 100644
47+
index 68bd389..f99894d 100644
4948
--- a/node_modules/react-native/Libraries/ReactNative/AppRegistry.js
5049
+++ b/node_modules/react-native/Libraries/ReactNative/AppRegistry.js
51-
@@ -232,12 +232,31 @@ const AppRegistry = {
50+
@@ -232,12 +232,34 @@ const AppRegistry = {
5251
appParameters: Object,
5352
displayMode?: number,
5453
): void {
@@ -67,7 +66,10 @@ index 68bd389..4d1925e 100644
6766
+ return parameters;
6867
+ }
6968
+
70-
+ const redactedSearchParams = [...new URLSearchParams(queryString).entries()].map(([key, value]) => `${key}=${sensitiveParams.includes(key) ? '<REDACTED>' : value}`);
69+
+ const redactedSearchParams = queryString.split('&').map((param) => {
70+
+ const [key, value] = param.split('=');
71+
+ return `${key}=${sensitiveParams.includes(key) ? '<REDACTED>' : value}`
72+
+ });
7173
+ return {...parameters, initialProps: {...initialProps, url: `${urlBase}?${redactedSearchParams.join('&')}`}};
7274
+ }
7375
+

0 commit comments

Comments
 (0)