Commit 4ff1d2e
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 328981e commit 4ff1d2e
File tree
1 file changed
+32
-2
lines changed- packages/react-native/React/CoreModules
1 file changed
+32
-2
lines changedLines changed: 32 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 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
101 | 131 | | |
102 | 132 | | |
103 | 133 | | |
| |||
0 commit comments