Bug #672
closeddeviceGet() needs to validate request by decoding it
100%
Description
Currently the deviceGet() function in imlightsw doesn't validate the request by decoding it, to make sure the sender is actually the monitor it's paired to.
This requires adding a decodeMessage() alternative to encodeMessage(), as imlightsw has not decoded any messages from the monitor yet.
Related issues
Updated by Hammel about 6 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
This is getting very close. The monitor now supports the /query/devices API and sends POST /query/device to each sensor to get updated information. And the sensor gets/decrypts the request and looks to be sending back a JSON response packet with it's current state (but just state right now). However, this message does not appear to be showing up at the monitor as a response to it's POST request. I'm probably either not really sending it or it's not actually being extracted on the monitor side from the response packet.
Updated by Hammel about 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
Everything is working here now. A query to a device causes the device to send back it's current configuration data which the monitor simply uses to replace the old data.
Verified on hardware. All code committed and pushed.
Closing issue.