arthurkushman / php-wss

Web-socket server/client with multi-process and parse templates support on server and send/receive options on client
MIT License
210 stars 32 forks source link

Opcode check inaccuracy #50

Open truekenny opened 3 years ago

truekenny commented 3 years ago

https://github.com/arthurkushman/php-wss/blob/6e027588d4a23bb9e55acc9d2ea61389df3b3af2/src/Components/WSClientTrait.php#L132

31 is 11111b, to check 4 bits, use the constant 15 (1111b). This is not so important now, because the algorithm grabs the RSV3 bit, which should now be 0. https://tools.ietf.org/html/rfc6455#section-5.2