Comparing 3.4.2...3.4.3 · socketio/socket.io-parser

Commits on May 22, 2023

  1. fix: check the format of the event name

    A packet like '2[{"toString":"foo"}]' was decoded as:
    
    {
      type: EVENT,
      data: [ { "toString": "foo" } ]
    }
    
    Which would then throw an error when passed to the EventEmitter class:
    
    > TypeError: Cannot convert object to primitive value
    >    at Socket.emit (node:events:507:25)
    >    at .../node_modules/socket.io/lib/socket.js:531:14
    
    History of the isPayloadValid() method:
    
    - added in [78f9fc2](78f9fc2) (v4.0.1, socket.io@3.0.0)
    - updated in [1c220dd](1c220dd) (v4.0.4, socket.io@3.1.0)
    
    Backported from 3b78117
    Configuration menu

    Browse the repository at this point in the history

  2. Configuration menu

    Browse the repository at this point in the history