Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26637

Re: Pickle file and send via socket

From Christian Heimes <lists@cheimes.de>
Subject Re: Pickle file and send via socket
Date 2012-08-06 18:45 +0200
References <f3b73b0e-1520-4768-a1d2-bb754357dfc7@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.3018.1344271574.4697.python-list@python.org> (permalink)

Show all headers | View raw


Am 06.08.2012 15:32, schrieb S.B:
> Does anyone know if it's possible to pickle and un-pickle a file across a network socket. i.e: 
> First host pickles a file object and writes the pickled file object to a client socket.
> Second host reads the pickled file object from the server socket and un-pickles it.

Have you read the warning in the first paragraph of the pickle docs?
Pickles are a major security risk unless both hosts are trustworthy and
are either inside a protected network or are connected over a secure line.

http://docs.python.org/library/pickle.html#module-pickle

Warning
The pickle module is not intended to be secure against erroneous or
maliciously constructed data. Never unpickle data received from an
untrusted or unauthenticated source.


Christian Heimes

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-06 06:32 -0700
  Re: Pickle file and send via socket Nobody <nobody@nowhere.com> - 2012-08-06 17:11 +0100
  Re: Pickle file and send via socket Christian Heimes <lists@cheimes.de> - 2012-08-06 18:45 +0200
  Re: Pickle file and send via socket Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-08-06 15:26 -0400
  Re: Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-07 04:21 -0700
    Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-07 14:07 +0100
  Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 13:48 +0100
    Re: Pickle file and send via socket "S.B" <hyperboogie@gmail.com> - 2012-08-08 06:50 -0700
      Re: Pickle file and send via socket lipska the kat <lipskathekat@yahoo.co.uk> - 2012-08-08 16:07 +0100

csiph-web