Commit 55a6e3c
Add headers validation check to prevent crash (facebook#55749)
Summary:
Pull Request resolved: facebook#55749
Add defensive checks when processing custom headers to ensure:
1. Header keys are valid NSString instances before using them
2. Header values are successfully converted before adding to the request
This prevents potential crashes when invalid header data (non-string keys or values that fail conversion) is passed from JavaScript to the WebSocket module.
Changelog: [Internal]
Differential Revision: D943755331 parent f4d9f84 commit 55a6e3c
File tree
1 file changed
+10
-2
lines changed- packages/react-native/React/CoreModules
1 file changed
+10
-2
lines changedLines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
101 | 109 | | |
102 | 110 | | |
103 | 111 | | |
| |||
0 commit comments