Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: socketio/socket.io
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: socket.io-parser@4.2.5
Choose a base ref
...
head repository: socketio/socket.io
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: socket.io-parser@4.2.6
Choose a head ref
  • 14 commits
  • 31 files changed
  • 5 contributors

Commits on Dec 23, 2025

  1. refactor: remove unused files

    [skip ci]
    darrachequesne committed Dec 23, 2025
    Configuration menu
    Copy the full SHA
    579d43f View commit details
    Browse the repository at this point in the history
  2. fix(sio): do not throw when calling io.close() on a stopped server

    Following [1], calling both `io.close()` and `httpServer.close()` would throw an ERR_SERVER_NOT_RUNNING exception, which was not the case before.
    
    Related: #5431
    
    [1]: bb0b480
    darrachequesne committed Dec 23, 2025
    Configuration menu
    Copy the full SHA
    9581f9b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e9e5bed View commit details
    Browse the repository at this point in the history
  4. 1 Configuration menu
    Copy the full SHA
    9978574 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2026

  1. Configuration menu
    Copy the full SHA
    d48718c View commit details
    Browse the repository at this point in the history
  2. fix(types): properly import http module

    This commit fixes `Module '"http"' has no default export.` errors (ts-node + esm).
    darrachequesne committed Jan 23, 2026
    Configuration menu
    Copy the full SHA
    74599a6 View commit details
    Browse the repository at this point in the history

Commits on Mar 2, 2026

  1. fix: cleanup pending acks on timeout to prevent memory leak (#5442)

    When using `emitWithAck` with a timeout, if clients didn't respond
    and the timeout triggers, the ack callbacks remained in `socket.acks`
    Map indefinitely, causing a memory leak.
    
    Related: #4984
    seungeonchoi authored and darrachequesne committed Mar 2, 2026
    Configuration menu
    Copy the full SHA
    da04267 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2026

  1. fix(eio): emit initial_headers and headers events in uServer (#5460)

    The uServer (uWebSockets.js) implementation did not emit
    "initial_headers" and "headers" events during WebSocket upgrades,
    unlike the regular Server which does this via the ws "headers" event.
    
    Related: #5300
    erdinccurebal authored Mar 4, 2026
    Configuration menu
    Copy the full SHA
    44ed73f View commit details
    Browse the repository at this point in the history
  2. fix(eio): add @types/ws as dependency (#5458)

    Since engine.io@6.6.5, the generated .d.ts files import types from "ws"
    (WebSocket, PerMessageDeflateOptions), but @types/ws was not declared as
    a dependency. This causes TypeScript compilation errors for consumers
    who do not have @types/ws installed.
    
    This follows the existing pattern where @types/cors and @types/node are
    already listed as dependencies.
    
    Related: #5437
    Not-Sarthak authored and darrachequesne committed Mar 4, 2026
    Configuration menu
    Copy the full SHA
    07cbe15 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2026

  1. Configuration menu
    Copy the full SHA
    84c2fb7 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2026

  1. revert: fix: cleanup pending acks on timeout to prevent memory leak

    This reverts commit da04267.
    
    The reverted fix was incorrect because the rooms might have changed between the emit() and the timeout.
    darrachequesne committed Mar 11, 2026
    Configuration menu
    Copy the full SHA
    ba9cd69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    37aad11 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2026

  1. fix(parser): add a limit to the number of binary attachments

    When a packet contains binary elements, the built-in parser does not modify them and simply sends them in their own WebSocket frame.
    
    Example: `socket.emit("some event", Buffer.of(1,2,3))`
    
    is encoded and transferred as:
    
    - 1st frame: 51-["some event",{"_placeholder":true,"num":0}]
    - 2nd frame: <buffer 01 02 03>
    
    where:
    
    - `5` is the type of the packet (binary message)
    - `1` is the number of binary attachments
    - `-` is the separator
    - `["some event",{"_placeholder":true,"num":0}]` is the payload (including the placeholder)
    
    On the receiving end, the parser reads the number of attachments and buffers them until they are all received.
    
    Before this change, the built-in parser accepted any number of binary attachments, which could be exploited to make the server run out of memory.
    
    The number of attachments is now limited to 10, which should be sufficient for most use cases.
    
    The limit can be increased with a custom `parser`:
    
    ```js
    import { Encoder, Decoder } from "socket.io-parser";
    
    const io = new Server({
      parser: {
        Encoder,
        Decoder: class extends Decoder {
          constructor() {
            super({
              maxAttachments: 20
            });
          }
        }
      }
    });
    ```
    darrachequesne committed Mar 17, 2026
    Configuration menu
    Copy the full SHA
    3fff7ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    522edcd View commit details
    Browse the repository at this point in the history
Loading