node.js - Error `RSV2 and RSV3 must be clear` in `ws` -
my app uses ws
in express server serve websocket. have seen lot of errors in production:
rsv2 , rsv3 must clear /app/node_modules/ws/lib/receiver.js:184:18getinfo /app/node_modules/ws/lib/receiver.js:153:16startloop /app/node_modules/ws/lib/receiver.js:139:10add /app/node_modules/ws/lib/websocket.js:142:22_ultron.on events.js:96:13emitone events.js:188:7emit _stream_readable.js:176:18readableaddchunk _stream_readable.js:134:10readable.push net.js:547:20onread
it seems happen of users, , have never been able reproduce in local environment.
what can further investigate root cause of error?
according rfc6455:
rsv1, rsv2, rsv3: 1 bit each
must 0 unless extension negotiated defines meanings non-zero values. if nonzero value received , none of negotiated extensions defines meaning of such nonzero value, receiving endpoint must fail websocket connection.
so sounds server dealing rogue client that's setting 1 of rsv2 or rsv3 (or both) without having first negotiated server meaning is.
i guess should try find out client/browser they're using, , perhaps preemptively block connections made it.
Comments
Post a Comment