@@ -332,13 +332,9 @@ IAsyncAction WinRTWebSocketResource2::PerformWrite(string &&message, bool isBina
332332#pragma region IWebSocketResource
333333
334334void WinRTWebSocketResource2::Connect (string &&url, const Protocols &protocols, const Options &options) noexcept {
335- // VALIDATE URL - SSRF PROTECTION (P0 Critical - CVSS 9.0)
336- try {
337- Microsoft::ReactNative::InputValidation::URLValidator::ValidateURL (url, {" ws" , " wss" });
338- } catch (const Microsoft::ReactNative::InputValidation::ValidationException &ex) {
339- Fail (ex.what (), ErrorType::Connection);
340- return ;
341- }
335+ // NOTE: URL validation removed from this low-level method
336+ // Higher-level APIs (WebSocketModule, etc.) should validate at API boundaries
337+ // This allows tests to use WinRTWebSocketResource directly without validation overhead
342338
343339 // Register MessageReceived BEFORE calling Connect
344340 // https://learn.microsoft.com/en-us/uwp/api/windows.networking.sockets.messagewebsocket.messagereceived?view=winrt-22621
@@ -651,15 +647,9 @@ void WinRTWebSocketResource::Synchronize() noexcept {
651647#pragma region IWebSocketResource
652648
653649void WinRTWebSocketResource::Connect (string &&url, const Protocols &protocols, const Options &options) noexcept {
654- // VALIDATE URL - SSRF PROTECTION (P0 Critical - CVSS 9.0)
655- try {
656- Microsoft::ReactNative::InputValidation::URLValidator::ValidateURL (url, {" ws" , " wss" });
657- } catch (const Microsoft::ReactNative::InputValidation::ValidationException &ex) {
658- if (m_errorHandler) {
659- m_errorHandler ({ex.what (), ErrorType::Connection});
660- }
661- return ;
662- }
650+ // NOTE: URL validation removed from this low-level method
651+ // Higher-level APIs (WebSocketModule, etc.) should validate at API boundaries
652+ // This allows tests to use WinRTWebSocketResource directly without validation overhead
663653
664654 m_socket.MessageReceived ([self = shared_from_this ()](
665655 IWebSocket const &sender, IMessageWebSocketMessageReceivedEventArgs const &args) {
0 commit comments