SIGN IN SIGN UP
socketio / socket.io UNCLAIMED

Realtime application framework (Node.JS server)

0 0 0 TypeScript

fix: check the format of the index of each attachment

A specially crafted packet could be incorrectly decoded.

Example:

```js
const decoder = new Decoder();

decoder.on("decoded", (packet) => {
  console.log(packet.data); // prints [ 'hello', [Function: splice] ]
})

decoder.add('51-["hello",{"_placeholder":true,"num":"splice"}]');
decoder.add(Buffer.from("world"));
```

As usual, please remember not to trust user input.

Backported from https://github.com/socketio/socket.io-parser/commit/b5d0cb7dc56a0601a09b056beaeeb0e43b160050
D
Damien Arrachequesne committed
fb21e422fc193b34347395a33e0f625bebc09983
Parent: 3b0a392