You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An attacker would need to already have write access to self.profile_dir.location, so would already have compromised your machine.
Sure, but at least it is easier to check for this case.
Plus if there are other files in self.profile_dir.location that would be executed anyway.
Sure, but self.db = PickleShareDB(os.path.join(self.profile_dir.location, 'db')) just adds a yet another place to check, and checking is nontrivial. Also the dir name tells nothing about the files in it are pickles.
It is dangerous to unpickle untrusted files, here what we have is perfectly trusted.
I know, but I'd prefer ipython to follow defense-in-depth approach and prefer file formats that are safe to work with.
I understand your point of view, but IPython being an interactive interpreter, there are just too many things like this that are weird in other libraries but are not here. This is by far not the most dangerous.
If you want to send PR(s) that slowly replace this code with a difference safe serialization format, I will consider it, but you will need to take into account migration from older format.
I'm going to reopen, but it's not going to be high priority.
Activity
Carreau commentedon Apr 14, 2023
An attacker would need to already have write access to self.profile_dir.location, so would already have compromised your machine.
Plus if there are other files in
self.profile_dir.locationthat would be executed anyway.It is dangerous to unpickle untrusted files, here what we have is perfectly trusted.
KOLANICH commentedon Apr 15, 2023
Sure, but at least it is easier to check for this case.
Sure, but
self.db = PickleShareDB(os.path.join(self.profile_dir.location, 'db'))just adds a yet another place to check, and checking is nontrivial. Also the dir name tells nothing about the files in it are pickles.I know, but I'd prefer ipython to follow defense-in-depth approach and prefer file formats that are safe to work with.
Carreau commentedon Apr 17, 2023
I understand your point of view, but IPython being an interactive interpreter, there are just too many things like this that are weird in other libraries but are not here. This is by far not the most dangerous.
If you want to send PR(s) that slowly replace this code with a difference safe serialization format, I will consider it, but you will need to take into account migration from older format.
I'm going to reopen, but it's not going to be high priority.