[WebSocket] Encoding bug fix

In the handshake verifier, make sure we're checking byte length, not string length
This commit is contained in:
Chris Boden 2012-05-19 23:01:40 -04:00
parent 986edd9562
commit 27716fef78

View File

@ -104,7 +104,7 @@ class HandshakeVerifier {
* @todo The spec says we don't need to base64_decode - can I just check if the length is 24 and not decode?
*/
public function verifyKey($val) {
return (16 === strlen(base64_decode((string)$val)));
return (16 === mb_strlen(base64_decode((string)$val), '8bit'));
}
/**