Rudis1261 / blink-server

This is the server you would need to be able to run the Blink Android Application.
MIT License
34 stars 7 forks source link

Possible security impact in handling input #11

Closed Cxarli closed 5 years ago

Cxarli commented 5 years ago

https://github.com/drpain/blink-server/blob/80ece1256cb53719f5e056771c2148eafde16415/core.py#L91-L108

I am kinda uneased about this piece of code. What's there to keep a malicious actor from sending an x-coordinate of ; rm /very/important/file ? Especially since the server is running as superuser, that is a risk to be careful of.

I would suggest using str(float(JSON['x'])) to make sure only numeric input can be entered.

Rudis1261 commented 5 years ago

Sure, true enough. Merged