Skip to content

fix(sio): parse Engine.v3 namespace query without Object.fromEntries - #5537

Open
FirmaSpring wants to merge 1 commit into
socketio:mainfrom
FirmaSpring:fix/sio-v3-namespace-fromentries
Open

fix(sio): parse Engine.v3 namespace query without Object.fromEntries#5537
FirmaSpring wants to merge 1 commit into
socketio:mainfrom
FirmaSpring:fix/sio-v3-namespace-fromentries

Conversation

@FirmaSpring

Copy link
Copy Markdown

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behavior

socket.io still advertises engines.node: >=10.2.0. Engine.v3 namespace handshake parsing in Client._parseNamespace uses Object.fromEntries() on URLSearchParams, which does not exist on Node 10/11.

A protocol-3 connect packet with query auth therefore throws on the Node versions the package still claims to support.

New behavior

Parse the query with a local objectFromEntries helper that does not depend on Object.fromEntries.

Other information (e.g. related issues)

Related leftover from #5527. Separate from the engine.io HTTP/uWS query parsers.

Keep protocol-3 connect auth parsing compatible with engines.node >=10.2.0.

Co-authored-by: FirmamentalSpring <287222957+FirmaSpring@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant