fastify / .github

Default community health files
https://help.github.com/en/articles/creating-a-default-community-health-file-for-your-organization
13 stars 4 forks source link

Function overriding chunks onUserInfoResponse #38

Closed Nerveyyyy closed 3 months ago

Nerveyyyy commented 3 months ago

Prerequisites

Fastify version

4.28.0

Plugin version

7.8.1

Node.js version

20.12.2

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

Sonoma 14.5

Description

There is a current bug where if the response of User Info is large enough, when the onUserInfoResponse function is called to grab the data via chunks, it is currently overriding the previous chunk that is set. Therefore causing an issue where I get an invalid JSON response since the response is half of the JSON response. This issue has been fixed in the function onDiscoveryResponse. With += chunks instead of = chunks in user info.

Link to code that reproduces the bug

No response

Expected Behavior

Respond with a full JSON without being cut off half way.