diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-09-08 03:00:58 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-09-08 03:00:58 +0300 |
commit | 59669f6bade15f2bc4c7b3c40fd9c9d3d202157c (patch) | |
tree | b14436548e18a40e1a71208f6e42e8d5dc43b008 /cura/CrashHandler.py | |
parent | 43969c8074875e726400998d368c925b988075f2 (diff) |
Apply bitmask to user scope
As discussed, this is a method to prevent leaking personally identifiable information through crash reports, while still keeping the useful information for the developers on how widely spread the crashes are.
Diffstat (limited to 'cura/CrashHandler.py')
-rw-r--r-- | cura/CrashHandler.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index 4c0dd4855b..db44daa77c 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -250,7 +250,10 @@ class CrashHandler: scope.set_context("plugins", self.data["plugins"]) - scope.set_user({"id": str(uuid.getnode())}) + user_id = uuid.getnode() # On all of Cura's supported platforms, this returns the MAC address which is pseudonymical information (!= anonymous). + user_id %= 2 ** 16 # So to make it anonymous, apply a bitmask selecting only the last 16 bits. + # This prevents it from being traceable to a specific user but still gives somewhat of an idea of whether it's just the same user hitting the same crash over and over again, or if it's widespread. + scope.set_user({"id": str(user_id)}) return group |