Don't write Octoprint keys to workspace projects

They should not be shared since they are private keys, so let's protect the user from accidentally sharing it via a project file.
This commit is contained in:
Ghostkeeper 2018-01-22 15:37:51 +01:00
parent 20ab6265c8
commit 50ccf101d8
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -97,7 +97,7 @@ class ThreeMFWorkspaceWriter(WorkspaceWriter):
file_in_archive.compress_type = zipfile.ZIP_DEFLATED
# Do not include the network authentication keys
ignore_keys = {"network_authentication_id", "network_authentication_key"}
ignore_keys = {"network_authentication_id", "network_authentication_key", "octoprint_api_key"}
serialized_data = container.serialize(ignored_metadata_keys = ignore_keys)
archive.writestr(file_in_archive, serialized_data)