Commit bbc05d8
Add URL validation check to prevent crash (facebook#55748)
Summary:
Add defensive check to validate the WebSocket URL before attempting to connect.
This prevents potential crashes when an invalid or nil URL is passed to the WebSocket module, which could cause XPC serialization failures deep in the network stack.
The crash was observed in during XPC serialization when SocketRocket attempted to open a connection with invalid URL data.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D943755271 parent e5d2d95 commit bbc05d8
File tree
1 file changed
+7
-0
lines changed- packages/react-native/React/CoreModules
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
0 commit comments