You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 00 suffixes on the received data signalled to me that there seems to be truncation happening due to the numbers stepping outside of JavaScript's safe limit on integers (Number.MAX_SAFE_INTEGER). Discord works fine with this however.
The text was updated successfully, but these errors were encountered:
This bug is due to how body-parser uses JSON.parse, which uses Number types instead of BigInt or string for large numbers. A similar fix was already done with the gateway ( swapping our usage of JSON.parse with the json-bitint npm package ), but for body-parser we'd have to patch the library. I've done a bit of local testing and it seems fine, but patching such an important package is a bit awkward. Maybe conditionally use json-bitint?
I'm having issues replying to messages. My message object contains something like this on the sending side :
However, the server gets it (I inserted a
console.log
@ https://github.com/fosscord/fosscord-server/blob/master/api/src/util/handlers/Message.ts#L85) asThe 00 suffixes on the received data signalled to me that there seems to be truncation happening due to the numbers stepping outside of JavaScript's safe limit on integers (
Number.MAX_SAFE_INTEGER
). Discord works fine with this however.The text was updated successfully, but these errors were encountered: