jrconlin/pushgo

registering to AWS server incorrectly returns pushEndpoint without uaid.channelID format

Closed this issue · 1 comments

run

python wsdump.py ws://ec2-54-244-98-201.us-west-2.compute.amazonaws.com:8080
Press Ctrl+C to quit
> {"uaid": "reg_noshake_uaid_1", "messageType": "hello", "channelIDs": ["reg_noshake_chan_1"]}
< {"messageType":"hello","status":200,"uaid":"reg_noshake_uaid_1"}
> {"channelID": "reg_noshake_chan_1", "messageType": "register"}
< {"messageType":"register","pushEndpoint":"http://ec2-54-244-98-201.us-west-2.compute.amazonaws.com:8080/update/wurJPnnskhwGfh-U9bHSJHG_h8R-agOFvGN5RrAovnWfRE6flH7g9MqZuQ9moNsM9MzT43E=","status":200}

Ah! that's not a bug.

Because of various privacy concerns, the server has the option to convert the endpoint into a reversable hash (you enable this feature by adding a "token_key" to the config.ini file). The hashing is not meant to be military grade, but to prevent a casual information leak.

Granted, this does mean that testing that particular response is a good deal more difficult, and actually requires sending an update using that URL and monitoring to see if the client WebSocket receives an update. My apologies if that wasn't clear in the initial documents.

WONTFIX