Skip to content

Commit

Permalink
Fix private tensor disclosure (#2434)
Browse files Browse the repository at this point in the history
private tensors aren't meant to be accessible from a remote client,
however, execute_command was getting any object using his id, this fix
get the object using the get_obj method that doesn't return private
tensors
  • Loading branch information
youben11 authored and LaRiffle committed Aug 2, 2019
1 parent 3eb9181 commit 4c4c8a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion syft/workers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ def execute_command(self, message: tuple) -> "pointers.PointerTensor":
# Handle methods
if _self is not None:
if type(_self) == int:
_self = self._objects[_self]
_self = self.get_obj(_self)
if _self is None:
return
if type(_self) == str and _self == "self":
_self = self
if sy.torch.is_inplace_method(command_name):
Expand Down

0 comments on commit 4c4c8a6

Please sign in to comment.