balena-io / balena-sdk-python

Balena SDK for Python
Apache License 2.0
67 stars 44 forks source link

Calling sdk.models.device.delete('') will delete all devices the user has access to. #372

Open otaviojacobi opened 1 month ago

otaviojacobi commented 1 month ago

All version of Python SDK from 13 to 15 have a bug when calling sdk.models.device.delete with an empty string UUID this would trigger a deletion of all accessible devices. If you call it with a too short UUID that matches several devices UUID, this would also trigger the deletion of all these devices.

Has been fixed on SDK version: https://github.com/balena-io/balena-sdk-python/pull/371 and from 15.0.1 a deletion by UUID will only delete a single device

thgreasi commented 3 weeks ago

Should we close this now @otaviojacobi ?