Skip to content

Conversation

@calzoneman
Copy link

The error reported in #2459 is caused by allowing junk UTF-16 strings to be passed to the utf8 module for encoding, which then throws an error (as documented in https://github.com/mathiasbynens/utf8.js#utf8encodestring).

This change avoids the issue by replacing such garbage values with U+FFFD 'REPLACEMENT CHARACTER' ("used to replace an incoming character whose value is unknown or unrepresentable in Unicode" -- http://www.fileformat.info/info/unicode/char/fffd/index.htm).

@nuclearace
Copy link
Member

@rauchg @nkzawa Does this look good?

@darrachequesne
Copy link
Member

Hi @calzoneman! Wouldn't it make sense to switch to wtf-8 (as you suggested here socketio/socket.io#2459), since there is currently no check for those lone surrogates for ws transport?

Maybe such sanitization should occur up-front?

@calzoneman
Copy link
Author

Switching to wtf-8 may make sense. I didn't investigate what all had to change for that and implemented this as a stopgap for myself. Whichever solution would actually be merged I'm willing to take a look at, but with the way things are going I don't currently have confidence that anyone is paying attention to this issue.

@polarathene
Copy link

polarathene commented Aug 24, 2016

Perhaps @nuclearace being a Socket.IO member is able to help bring in a new maintainer for this repo? There has been an issue/PR for 5 months affecting React-Native developers that want to use socket.io for websockets that gets no attention from @rauchg or others that I and others have reached out to so far.

It would be great for a maintainer of this repo to step up and at least confirm they're no longer able to find time to maintain this repo and offer the role to another member of the community. It would seem that any new PR or issues raised will not be addressed for the foreseeable future :(

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.

4 participants