Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decrypt failed should disconnect the socket #30

Open
neojski opened this issue Dec 16, 2019 · 0 comments
Open

Decrypt failed should disconnect the socket #30

neojski opened this issue Dec 16, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@neojski
Copy link
Contributor

neojski commented Dec 16, 2019

Right now it seems to throw an exception that gets written to logs but otherwise does nothing.

This can be reproduced by sending the wrong key to the socket.

  @tuyapi/driver 192.168.0.34: Received: 000055aa00000000000000080000008b00000000332e31376138353563356665613333653334634567324a592b69715359576131715a79396b577a30517572465a532b73686e704d3361656f51636e36647262307866746b6a67456d37535751436a6b7267782f7a3343506c2b6459353568325a564b37373831616c764f6b4144396454726f3743363558457770416d586f3d4a844e420000aa55 +0ms
Error: Decrypt failed.
    at decrypt (/home/neo/repos/driver/dist/lib/crypto.js:25:15)
    at Object.decrypt (/home/neo/repos/driver/dist/lib/crypto.js:23:20)
    at Frame.decrypt (/home/neo/repos/driver/dist/lib/frame.js:32:37)
    at Messenger.decode (/home/neo/repos/driver/dist/lib/messenger.js:68:19)
    at /home/neo/repos/driver/dist/device.js:110:43
    at Array.forEach (<anonymous>)
    at Device._handleSocketData (/home/neo/repos/driver/dist/device.js:109:44)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
@codetheweb codetheweb added the bug Something isn't working label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants