Commit b97b3d1
Add URL validation check to prevent crash (#55748)
Summary:
Pull Request resolved: #55748
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]
Differential Revision: D943755271 parent d1b2ddc commit b97b3d1
File tree
1 file changed
+9
-0
lines changed- packages/react-native/React/CoreModules
1 file changed
+9
-0
lines changedLines changed: 9 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 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
0 commit comments