Ver Fonte

Don't handle payload if server returns masked data (#401)

Mykola Voronin há 9 anos atrás
pai
commit
383c787add
1 ficheiros alterados com 1 adições e 0 exclusões
  1. 1 0
      SocketRocket/SRWebSocket.m

+ 1 - 0
SocketRocket/SRWebSocket.m

@@ -964,6 +964,7 @@ static const uint8_t SRPayloadLenMask   = 0x7F;
         
         if (header.masked) {
             [self _closeWithProtocolError:@"Client must receive unmasked data"];
+            return;
         }
         
         size_t extra_bytes_needed = header.masked ? sizeof(_currentReadMaskKey) : 0;