Skip to content

Add URL validation check to prevent crash#55748

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

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

Conversation

@vzaidman
Copy link
Copy Markdown
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

@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
Copy Markdown

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
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 26, 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 26, 2026
Summary:
Pull Request resolved: facebook#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: D94375527
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 26, 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 26, 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 26, 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 26, 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 26, 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 26, 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 26, 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 26, 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 26, 2026
Summary:
Pull Request resolved: facebook#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: D94375527
@vzaidman vzaidman force-pushed the export-D94375527 branch 2 times, most recently from bb59aa5 to 387f532 Compare February 27, 2026 12:29
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 27, 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]

Reviewed By: javache

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

Reviewed By: javache

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

Reviewed By: javache

Differential Revision: D94375527
vzaidman added a commit to vzaidman/react-native that referenced this pull request Feb 27, 2026
Summary:
Pull Request resolved: facebook#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]

Reviewed By: javache

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

Reviewed By: javache

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

Reviewed By: javache

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

Reviewed By: javache

Differential Revision: D94375527
Summary:
Pull Request resolved: facebook#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]

Reviewed By: javache

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

Reviewed By: javache

Differential Revision: D94375527
@meta-codesync meta-codesync bot closed this in d5b2827 Mar 3, 2026
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @vzaidman in d5b2827

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 3, 2026

This pull request has been merged in d5b2827.

zoontek pushed a commit to zoontek/react-native that referenced this pull request Mar 9, 2026
Summary:
Pull Request resolved: facebook#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]

Reviewed By: javache

Differential Revision: D94375527

fbshipit-source-id: e82876c075a3daa9fbe6a06dc27d91bd809fecf7
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 Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants