Skip to content

Add URL validation check to prevent crash#55748

Open
vzaidman wants to merge 1 commit intofacebook:mainfrom
vzaidman:export-D94375527
Open

Add URL validation check to prevent crash#55748
vzaidman wants to merge 1 commit intofacebook:mainfrom
vzaidman:export-D94375527

Conversation

@vzaidman
Copy link
Contributor

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]

Differential Revision: D94375527

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]

Differential Revision: D94375527
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 25, 2026
@meta-codesync
Copy link

meta-codesync bot commented Feb 25, 2026

@vzaidman has exported this pull request. If you are a Meta employee, you can view the originating Diff in D94375527.

vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 25, 2026
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]

Differential Revision: D94375527
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 25, 2026
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]

Differential Revision: D94375527
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants